Closed Bug 372303 Opened 17 years ago Closed 14 years ago

in-flow tables' vertical margins don't collapse with adjacent in-flow block-level elements

Categories

(Core :: Layout: Tables, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 87277

People

(Reporter: sam, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2

Because a table display type is "table" and not "block," I believe the rendering engine is not collapsing a table's vertical margins with an adjacent header tag. IE and Safari get it right as far as I can tell from the specs.

In the css spec under "block-level elements and block boxes" the table display type is categorized as a block-level element so I am relatively sure this behavior is incorrect.

If I change the display css attribute of the table to "block," the margin collapse issue is fixed, but the table renders incorrectly (obviously).

Reproducible: Always

Steps to Reproduce:
1. create an in-flow header with margin: 20px and the rest default.
2. create an in-flow table with margin: 20px and the rest default.
Actual Results:  
There is a 40px space between the header and the margin.

Expected Results:  
There should be a 20px margin between them, because they should collapse according to the spec AFAICT.
Attached file reduced test-case
Have you tried a trunk build? Lots of reflow/layout/rendering work has been done on it. 3.0a3 @ http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
Keywords: testcase
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.8 Branch
Dupe of bug 87277 ?
Yes, I would resolve it as a dup of bug 87277 although this bug involves margin collapsing between a block-level element (<h1>) and a nextSibling table while bug 87277 refers to tables as consecutive siblings. It's still adjacent in-flow block-level elements..
CONFIRMING, marking as NEW

Marking as dependent on bug 50959

Component: Layout: Tables

Version: trunk

URL field updated

Status: UNCONFIRMED → NEW
Component: Layout → Layout: Tables
Depends on: 50959
Ever confirmed: true
Version: 1.8 Branch → Trunk
I'm not sure .. maybe Component should be instead/rather 
Layout: Block and Inline

Seamonkey 2.0a1pre rv:1.9b3pre build 2008010102 under XP Pro SP2 and Firefox 2.0.0.11 fail the test case at provided URL.
QA Contact: layout → layout.tables
Table generate anonymous block box, but table can't collapse with this box, because table is not block level element.
Note sure why this was marked "depends on" bug 87277; it should be a duplicate.

The problems both boil down to "table box margins don't collapse like normal blocks" and the solutions both boil down to "make table box margins collapse like normal blocks".
Status: NEW → RESOLVED
Closed: 14 years ago
No longer depends on: 87277
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: