"dh**********@gmail.com" <dh**********@gmail.comwrote:
news:96**********************************@a39g2000 pre.googlegroups.com:
Hi,
If I have 5 blocks, each float: left, each width 20%, then why does
IE7 put the last one on the next line?
http://dhtmlkitchen.com/test/bug/float-bug.html
You set a width of 763px for which 20% does not give a whole number, and
now the UA decides what to do with it.
763/5=152.6
IE rounds it up to 153 and that makes the UL 2px too narrow and so the
float goes to then next line.
FF sets the width to 152.533 which adds up to 762.655. With the aid of a
special background image, it appears that FF alternates the width of the
elements something like 153 152 153 152 153 for a grand total of 763.
Others round it down to 152, which if you give the UL a background-color
you see just a wee bit of it.
I would set the width of the UL to 170px or 175px in an attempt to avoid
the issue.
--
BootNic Saturday December 1, 2007 1:18 PM
Our earth is degenerate in these latter days; bribery and corruption
are common; children no longer obey their parents; and the end of the
world is evidently approaching.
*Assyrian clay tablet 2800 B.C.*