Closed Bug 295069 Opened 15 years ago Closed 15 years ago

Wide tables don't clear floats


(Core :: Layout: Floats, defect)

Not set





(Reporter: fool, Unassigned)




User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

When a table or div with "overflow: hidden" is placed in the same container as a
float, they should be moved below the float if they don't fit beside it. This
does not happen in FF1.0.4, as well as most recent nightly (trunk+avery).

Firefox does clear the float if an image is used instead (of e.g. a table).

Minimal test case for the <a
href="">table</a> and <a

FWIW, Opera8 does this correctly while IE6 always clears the float when the
block-level content does not fit beside the float (regardless of overflow setting).

Straight from the horses mouth (the <a
href="">CSS2.1 spec</A>):
"The margin box of a table or an element in the normal flow that establishes a
new block formatting context (such as an element with 'overflow' other than
'visible') must not overlap any floats in the same block formatting context as
the element itself. If necessary, implementations should clear the said element
by placing it below any preceding floats, but may place it adjacent to such
floats if there is sufficient space."

Reproducible: Always

Steps to Reproduce:
Component: JavaScript Console → General
dup of bug 290146?

-> Layout: Floats
-> Trunk per reporter's comment
Component: General → Layout: Floats
Product: Firefox → Core
QA Contact: javascript.console → layout.floats
Version: unspecified → Trunk
Yes, dupe of bug 290146, although my report includes the table issue (the
rendering bug is not restricted to divs with overflow: hidden but includes
tables, possibly others).

Summary of that bug should be updated with table keyword (since tables are
listed as a specific exception in the CSS spec). A "clear" keyword should
probably be added as well, since this is the term used when a block is pushed
below a float.
Searching for "clear" and "table" will find this bug, which leads to the other.

*** This bug has been marked as a duplicate of 290146 ***
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.