Closed
Bug 254136
Opened 21 years ago
Closed 21 years ago
div overlap if clear:both not defined
Categories
(Core :: Layout: Block and Inline, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: luke, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1
content should look like http://www.pudor.co.uk/demo/testlayout.html, but
instead the last two divs are rendered half way through the main div.
Reproducible: Always
Steps to Reproduce:
see below
Actual Results:
http://www.pudor.co.uk/demo/testlayout2.html
Expected Results:
http://www.pudor.co.uk/demo/testlayout.html
Could be related to the inline width elements specified in the html above, but
have been unable to isolate it specifically. Works fine if clear:both is
specified for any divs further on down the page.
Comment 1•21 years ago
|
||
This is the correct layout since floats are not part of the normal flow.
You have to specify 'clear:both' on later blocks if you don't want them to
overlap (i.e. their background), it's only the line boxes that flows around
the float. See http://www.w3.org/TR/CSS21/visuren.html#floats
You can better see what is happening if you remove the hard-coded 'height: 1em'
you have, then you'll see that the blocks increase their height so that the
text can be moved after the floats. With an explicit height like that the moved
line boxes will actually become overflow.
Comment 2•21 years ago
|
||
Comment 3•21 years ago
|
||
Comment 4•21 years ago
|
||
-> INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•