Closed
Bug 198534
Opened 21 years ago
Closed 21 years ago
margin of child element is rendered outside border-less parent element
Categories
(Core :: Layout: Block and Inline, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: aholmes84, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 In the given example ( http://devel.rawendwebdesigns.com/margin_error.html ), the margin of the h1 is rendered outside the containing div unless the div has a border. Should be able to reproduce with any block element. Reproducible: Always Steps to Reproduce: 1. Put a block level element with margin inside one without. 2. Place another block level element so it renders above/below the above parent element 3. Possibly colour both to better see the effect Actual Results: The margin of the child-element is rendered outside the parent's box. Expected Results: Rendered margin inside parent box.
This is how it's supposed to work. See: http://www.w3.org/TR/CSS21/box.html#collapsing-margins http://www.w3.org/TR/CSS21/visudet.html#q19
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•