Wide tables don't clear floats

RESOLVED DUPLICATE of bug 290146

Status

()

Core
Layout: Floats
RESOLVED DUPLICATE of bug 290146
12 years ago
5 years ago

People

(Reporter: fyodor, Unassigned)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

12 years ago
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="http://www.gjk.dk/~krn/bugs/firefox/floatbug_2.html">table</a> and <a
href="http://www.gjk.dk/~krn/bugs/firefox/floatbug_1.html">div</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="http://www.w3.org/TR/CSS21/visuren.html#floats">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:
(Reporter)

Updated

12 years ago
Component: JavaScript Console → General

Comment 1

12 years ago
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
(Reporter)

Comment 2

12 years ago
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.

Comment 3

12 years ago
Searching for "clear" and "table" will find this bug, which leads to the other.

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