Posted by Jim Moe on 04/06/06 04:29
William Krick wrote:
> 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.
>
form { display: table; }
But that is not supported by IE.
Another way is to float the element: form { float: left; }. In the
absence of an explicit width rule, it shrinks to fit its contents. But
then you have to deal with a floating element.
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
[Back to original message]
|