Previous Message
Next Message

Width of floats

Sent by Arlen Walker on 12 October 2005 15:03


On Oct 12, 2005, at 4:07 AM, Jørgen Farum Jensen wrote:

> Derek de Jong wrote:
>
>
>> Internet Explorer is including the margin *inside the box width*,  
>> while
>>
>
> This is what I did'nt know.

Just as well you didn't, as it's incorrect. IE5's broken box model  
included padding and border in the width, but not the margin.

I suspect your issue is with fractions. 49+49+2=100 right enough, but  
let's apply that to a real-world screen. 49% of a 1005-pixel-wide  
viewport is 492.45 pixels. The browser can't light up a fraction of a  
pixel, and the standard leaves the handling of fractional pixel  
widths to the browser, so some will truncate and some will round up.  
Hence some browsers will see your layout as 492+492+20=1004 and some  
as 493+493+21=1007 pixels wide.

Moral: let your percentages add up to 99, *not* 100, and you'll  
always stay within bounds.

Have Fun,
Arlen

------------------------------
In God we trust, all others must supply data

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: