HighDots Forums  

IE7 Float Bug With Percentage Width?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss IE7 Float Bug With Percentage Width? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dhtmlkitchen@gmail.com
 
Posts: n/a

Default IE7 Float Bug With Percentage Width? - 12-01-2007 , 12:40 AM






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

Garrett

Reply With Quote
  #2  
Old   
BootNic
 
Posts: n/a

Default Re: IE7 Float Bug With Percentage Width? - 12-01-2007 , 12:18 PM






"dhtmlkitchen (AT) gmail (DOT) com" <dhtmlkitchen (AT) gmail (DOT) com> wrote:
news:964f8d36-ab37-4d8c-8b10-2cb8b7cd35b0 (AT) a39g2000pre (DOT) googlegroups.com:

Quote:
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.*


Reply With Quote
  #3  
Old   
BootNic
 
Posts: n/a

Default Re: IE7 Float Bug With Percentage Width? - 12-01-2007 , 08:03 PM



BootNic <b00tnic (AT) yahoo (DOT) com> wrote: news:Xns99F9875A61AE6BootNic@
85.214.90.236:

[snip]
Quote:
I would set the width of the UL to 170px or 175px in an attempt to avoid
the issue.
I have no ideal where I got 170px and 175px. What it should be is 760px or
765px.

--
BootNic Saturday December 1, 2007 9:03 PM
"Do not trust your memory; it is a net full of holes; the most
beautiful prizes slip through it."
*Georges Duhamel, The Heart's Domain*



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.