Reply to Re: CSS and form width problems

Your name:

Reply:


Posted by BootNic on 04/06/06 06:57

> "William Krick" <wkrick@gmail.com> wrote:
> news:1144266048.089162.12430@e56g2000cwe.googlegroups.com....
>
> When I use the <form> tag and give it a background color, by
> default, the form's width is 100%.
>
> I would like it to behave like a table and have it constrict to fit
> the content inside of it.
>
> Is this possible with CSS?
>
> Or do I have to resort to something ugly like putting a table around
> the form?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content=
"text/html; charset=windows-1252">
<style type="text/css">
form{
display:table;
color:#0000FF;
background-color:#E6E6FA;
border:#800080 0.1em solid;
}
input{
display:block;
margin:0.3em;
}
</style>
<!--[if IE]>
<style type="text/css">
form{
width:1px;
overflow:visible;
}
</style>
<![endif]-->
<title></title>
</head>
<body>
<form action="#">
<div>
<input><input type="submit">
</div>
</form>
</body>
</html>

--
BootNic Wednesday, April 05, 2006 9:32 PM

Genius is eternal patience.
*Michelangelo*

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация