Closed Bug 428634 Opened 16 years ago Closed 16 years ago

overflow:hidden messes up proper floating

Categories

(Core :: Layout, defect)

PowerPC
macOS
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 377664

People

(Reporter: jeff, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5

if the first of two divs is floated left, and the second is given a left margin greater than the width of the first div, the distance between the divs should be the difference between the assigned margin and the width of the first div.  However, when the second div is assigned "overflow:hidden", the distance between the divs is equal to the entire margin (not reduced by the width of the first div).

Reproducible: Always

Steps to Reproduce:
1.go to http://test.kingdesk.com/firefox-float-bug/
2.copy the source
3.remove the "overflow:hidden" from the css
4.it will display as it should
5.re-enter "overflow:hidden"
6.it displays in error
Actual Results:  
I was able to make the distance between the two divs improperly change.

Expected Results:  
The distance between the divs should not change, and should always be the value of the left margin less the width of the first div.

That is pretty much it.
Gecko used to be correct in this, until the wording of CSS 2.1 9.5 changed from 'margin-box' to 'border-box' (last paragraph before the example)
http://www.w3.org/TR/CSS21/visuren.html#floats

See bug 377664 for the details.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Component: General → Layout
Product: Firefox → Core
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.