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

Re: Margin collapsing and overflow: hidden

From: Michael Day <mikeday@yeslogic.com>
Date: Mon, 08 Oct 2007 10:45:18 +1000
Message-ID: <47097D9E.4070008@yeslogic.com>
To: Bruno Fassino <fassino@gmail.com>
CC: www-style@w3.org

Hi Bruno,

> And about Opera it should be noted that _any_ empty div (even without
> overflow) stops the collapsing between a preceding and a following sibling,
> so Opera doesn't seem too realiable here.

I'm not seeing this in Opera 9, if I change hidden to visible the gap 
between paragraphs gets smaller as the margins collapse.

> With a simpler construction with just two siblings, the addition of
> overflow:hidden doesn't seem to stop the collapsing in any browsers.

Are you sure? Try this test document in Opera 9 and Firefox 1.5:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<div style="overflow: hidden"></div>

There should be a larger than usual gap between the two paragraphs, 
which returns to normal if hidden is changed to visible.

Best regards,


Print XML with Prince!
Received on Monday, 8 October 2007 00:45:40 UTC

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