W3C home > Mailing lists > Public > www-style@w3.org > February 2010

[CSS21] 8.3.1 margin-bottom of 'collapsed through' box with clearance applied

From: Bruno Fassino <fassino@gmail.com>
Date: Wed, 3 Feb 2010 23:42:20 +0100
Message-ID: <da98bce01002031442g33ba1b62y944934d1d52a0764@mail.gmail.com>
To: www-style <www-style@w3.org>
In 8.3.1 :
"When an element's own margins collapse, and that element has had
clearance applied to it, its _top margin_ collapses with the adjoining
margins of subsequent siblings but that resulting margin does not
collapse with the bottom margin of the parent block."

Only the _top margin_  of the element is explicitly mentioned. Why?
Should the "resulting margin" mentioned in that sentence exclude the
element's bottom margin?
What should happen to that bottom margin?

9.5.2 does not help: it is clear that the bottom margin does not enter
in the computation of clearance, but then no explicit mention of what
should happen to it is made.

Browsers seems to disagree:
Firefox includes that bottom margin into the collapsing with the top
margin and with subsequent siblings, and makes the whole result not
collapsing with parent's bottom.
Safari makes that bottom margin to disappear.
(Firefox behavior looks preferable to me.)

Here is a simple test case:
where an element with clearance is 'collapsed through', has
margin-bottom greater than margin-top, and is the last child of its

Finally, in 10.6.3 :
"Similarly, if the bottom margin of the block does not collapse with
the bottom margin of its last in-flow child, then the content ends at
the bottom margin edge of the bottommost child."

This mentions the _bottom margin_ of the child, so it's not clear if
it can be applied to the case when the child is a 'collapsed through'
box with clearance, because in 8.3.1 only the _top margin_ is

Best regards,

Bruno Fassino http://www.brunildo.org/test
Received on Wednesday, 3 February 2010 22:42:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:32 UTC