Vertical margins on html and body tag results in a sum of the two margins (instead of the largest of the two)

RESOLVED INVALID

Status

()

Core
Layout: Block and Inline
RESOLVED INVALID
14 years ago
14 years ago

People

(Reporter: Kevin Ar18, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+

http://www.w3.org/TR/CSS1#formatting-model
"Two or more adjoining vertical margins are collapsed to use the maximum of the
margin values."
When you specify vertical margin for the html and body tag, they do not collapse
to the maximum of the two values, but instead display as the sum or total of the
two margins.

Reproducible: Always
Steps to Reproduce:
1. Add a margin to the html tag.
2. Add a margin to the body tag.
3. View in browser

Actual Results:  
The vertical margins from the html and body tag are added together.

Expected Results:  
The largest of the two margins should have been chosen.

Note: I am not sure if the html and body tag provide some special case for the
box model.  I am not very familiar with such areas.  Thus, someone with more
knowledge on the subject might need to confirm whether this bug report is indeed
valid.
(Reporter)

Comment 1

14 years ago
Created attachment 150971 [details]
Testscase

Testcase
(Reporter)

Comment 2

14 years ago
http://www.w3.org/TR/REC-CSS2/box.html#collapsing-margins
"Margins of absolutely and relatively positioned boxes do not collapse."

Is <html> absolutely positioned (thus the reason for the margins not collapsing)?
According to 8.3.1:
|
|   o Margins of the root element's box do not collapse.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.