Closed Bug 274476 Opened 21 years ago Closed 21 years ago

block element with a margin or border inside a block element that has no padding renders the margin or border on the outer block element

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: brian, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041213 In the page at http://www.eclecticgeek.com/bugzilla/css1.htm the outer block element (grey background) should be flush against the borders of the page. There should be a standard margin above/below the inner block element (a paragraph tag). In Mozilla/Firefox/Thunderbird for Windows XP and Firefox for OS X the page is rendered as if the inner element has no margin and the outer element does. Essentially, the rendering of a block element that has no padding or border is done incorrectly when that element contains a block element that has a margin. The top/bottom margin of the inner element appears to be rendered as the top/bottom margin of the outer element. Reproducible: Always Steps to Reproduce: 1. Start Mozilla/Firefox 2. Open the testcase Actual Results: The outer element appears to have a margin equal to that of the inner element and no padding. The inner element appears to have no top/bottom margin. Expected Results: The outer element should be flush against the top of the page. The margin of the inner block element should expanding the height of the outer block element. (If my understanding of the spec is correct.)
http://www.w3.org/TR/2004/CR-CSS21-20040225/box.html#collapsing-margins (Some of your comments mention borders as well, and if that's really the case, please reopen with a testcase, but I suspect it's not.)
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
(In reply to comment #1) > http://www.w3.org/TR/2004/CR-CSS21-20040225/box.html#collapsing-margins > > (Some of your comments mention borders as well, and if that's really the case, > please reopen with a testcase, but I suspect it's not.) Sorry for wasting your time. I'll have to pay better attention to the spec next time. :( I suspect you're correct regarding borders. I was a little over-zealous including that one.
You need to log in before you can comment on or make changes to this bug.