Closed Bug 802178 Opened 13 years ago Closed 6 years ago

CSS margin incorrectly calculated

Categories

(Core :: Layout: Block and Inline, defect)

15 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: nebupookins, Unassigned)

Details

(Whiteboard: INVALID?)

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4 Steps to reproduce: Demo available at http://jsfiddle.net/fZnHV/ If you uncomment the CSS line about the border, this seems to make the issue go away. This issue might also be related to 451791 Actual results: The green box has a margin between it and the top of the page Expected results: We expect the green box to be positioned at the top of the page.
I just noticed that you've captured the user agent of the browser used to post the bug. For what it's worth, the user agent of the browser that exhibits the bug is: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0.1
Component: Untriaged → Layout: Block and Inline
Product: Firefox → Core
Sounds like interaction of margin-collapsing and clearance, given the border dependency. It's not actually obvious to me from examining the testcase what the correct rendering is, per spec. But given that WebKit and Presto do the same thing we do, I suspect the rendering you see is correct.
Whiteboard: INVALID?

Can I contribute to this bug?

Every browser looks the same here, so yeah, I think bz is right and this is invalid. The border-top makes the #navigation margin not participate in margin-collapsing.

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: