On Dec 12, 2006, at 10:31 PM, Gunlaug Sørtun wrote:

>> IE 7 handles 'width' and 'width:auto' reasonably correctly, and
>> doesn't expand the element to accommodate the table
>>
>> Using 'float:left' width *no width* declared does the trick for IE 7.
>
> Looks like the resulting style should be...
> .content {
>       border: solid 1px #BCCF78;
>       background-color: #FFFFFF;
>       display: table;
>       float: left;
> }
> ...then, so we don't leave any major browser behind.

Actually, the float trick works in all modern browsers here.
And , when you think of it, it is kind of logical: (when) the floated  
block has no width specified, and expands to fit the content, the  
same way as it would shrink to fit if the table (or other contents)  
were very small.
Of course, one has to take the particular characteristics of floats:  
they are removed from the flow. As such, using float may have adverse  
effects on the layout.

(personally, I'd prefer display:table anyway, keeping the float trick  
for IE7 only)

Philippe
---
Philippe Wittenbergh
<http://emps.l-c-n.com>




______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to