Closed
Bug 373608
Opened 18 years ago
Closed 18 years ago
CSS: margin is transfered to parent element if it has no border
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: marty, Unassigned)
Details
Attachments
(1 file)
|
1.13 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2
When nesting (block-level) elements, the margin of an element is transfered to its parent when that parent doesn't have a border defined
Reproducible: Always
Steps to Reproduce:
1. nest a few divs (without border)
2. give them different background-colours
3. define a top-margin for a nested div and look what happens to its parent
4. now define borders and look what happens again
Actual Results:
Without border, the parent div will take the margin of the nested div
Expected Results:
the div with the margin defined should display this margin, not its parent
I'm using firefox 2.0.0.2
| Reporter | ||
Comment 1•18 years ago
|
||
Comment 2•18 years ago
|
||
I'm pretty sure that's collapsing margins which is in the CSS spec.
http://www.w3.org/TR/CSS21/box.html#collapsing-margins
Comment 3•18 years ago
|
||
(In reply to comment #2)
> I'm pretty sure that's collapsing margins which is in the CSS spec.
> http://www.w3.org/TR/CSS21/box.html#collapsing-margins
>
I agree
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•