473,405 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

IE7 Float Bug With Percentage Width?

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
Dec 1 '07 #1
2 5074
"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.*
Dec 1 '07 #2
BootNic <b0*****@yahoo.comwrote: news:Xns99F9875A61AE6BootNic@
85.214.90.236:

[snip]
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*

Dec 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Andre | last post by:
My website at http://www.oregonsae.org/2004mbw/ is a simple three column table. There is only one table, and one row. The menu on the left side is one <TD>, the content in the center is another...
4
by: Aaron Robson | last post by:
Hi about 1% of my clients use macs, and I've spent an inordinate amount of time trying to get things working on them... I've validated my html and css - the html has 5 errors (strict), all due to...
2
by: Andy Moss | last post by:
I have a table wrapped in a div like this: <div id="content"><table id="calendar"> <tr> <th id="caldate"><span>Date</span></th> <th id="caltitle"><span>Title</span></th> <th...
2
by: Oliver Burnett-Hall | last post by:
I'm trying to move to using tableless page layouts, but I've come across what appears to be a bug in IE5's rendering that I can't find a way to overcome. The page has a sidebar to the left of...
19
by: Wenfei | last post by:
float percentage; for (j = 0; j < 10000000; j++) { percentage = sinf(frequency * j * 2 * 3.14159 / sampleFreq ); buffer =ceilf(volume * percentage) + volume; totalBytes++; } Because the...
0
by: jonipony | last post by:
HELP: Float Left box is drifting to the right in ie! -------------------------- I need som HELP with my CSS coding! On the following web page my design falls apart at screen size 800 x 600...
1
by: chr.aleksander | last post by:
Hey, I need a solution to two problems: #1 I use a three column layout, where the right and left columns are 150px wide and floated. The center column is not floated, with margins 150px on each...
6
by: Hacking Bear | last post by:
Hi, I still don't quite fully understand how to handle mixing border/margin pixel width with percentage width. In the example below, I want to place side-by-side two DIV boxes inside a box....
2
by: jackgeek | last post by:
I am trying to create a film strip of thumbnails in a photo gallery type page. I have an idea to create a div with all the thumbnails in it and then use another div to contain that so it can be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.