Setting margins for and element within a DIV seems to apply the margin to the DIV and not to the element

RESOLVED INVALID

Status

()

RESOLVED INVALID
16 years ago
16 years ago

People

(Reporter: mozilla, Unassigned)

Tracking

Trunk
x86
Other
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

16 years ago
User-Agent:       Opera/7.11 (Windows 95; U)  [en]
Build Identifier: Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.3.1) Gecko/20030425

Running Moz 1.3.1 on Win95b.

I have attached a testcase and a screenshot of it.

The testcase has a DIV at the top. Within the DIV is a P. The DIV, BODY, and 
HTML elements all have margin and padding set to 0em. The P in the DIV has 
margin and padding set to 0em. The margin-top and margin-bottom for the P seem 
to be applied to the DIV instead.

Reproducible: Always

Steps to Reproduce:
1. Load test case.
Actual Results:  
The DIV is given the margin of 1em.

Expected Results:  
The margin should have been given to the P.

Occurs using bot Pinball and Modern themes.
(Reporter)

Comment 1

16 years ago
Created attachment 124152 [details]
Original testcase

Sorry, forgot to attach testcase and screenshot...
(Reporter)

Comment 2

16 years ago
Created attachment 124153 [details]
Screenshot of the testcase
(Reporter)

Comment 3

16 years ago
Edit (typo): Original report should have said "The P in the DIV has 
margin and padding set to 1em." (It incorrectly said "0em.")

Sorry for the messy reporting.

Comment 4

16 years ago
Oddly enough, IE renders it exactly the same as Mozilla :)
INVALID. What we are doing is correct per the CSS2 specification. See:
   http://www.w3.org/TR/REC-CSS2/box.html#collapsing-margins
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.