W3C home > Mailing lists > Public > www-style@w3.org > October 2007

Margin collapsing and overflow: hidden

From: Michael Day <mikeday@yeslogic.com>
Date: Sun, 07 Oct 2007 15:11:47 +1000
Message-ID: <47086A93.2080003@yeslogic.com>
To: www-style@w3.org


In the CSS 2.1 box model section on collapsing margins [1], it states 
that "Vertical margins of elements with 'overflow' other than 'visible' 
do not collapse with their in-flow children".

However, Firefox and Opera appear to disable collapsing with the in-flow 
siblings of the element as well.

For example:

<div style="overflow: hidden"></div>

The empty div with overflow: hidden will inhibit margin collapsing 
between the two paragraphs. This does not quite seem to be consistent 
with the spec as written, unless I'm missing another clause there.

Should the spec be amended to state "children and siblings"?

Best regards,


[1] http://www.w3.org/TR/CSS21/box.html#collapsed-through

Print XML with Prince!
Received on Sunday, 7 October 2007 05:12:20 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:31 UTC