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

Re: Margin collapsing and overflow: hidden

From: David Hyatt <hyatt@apple.com>
Date: Mon, 08 Oct 2007 13:07:13 -0500
To: Michael Day <mikeday@yeslogic.com>
Cc: www-style@w3.org
Message-id: <F8B5300A-C9BA-4184-AB50-7A6DD87FE2D5@apple.com>

I think Firefox and Opera are wrong here.  WebKit does not inhibit  
the margin collapsing between the two paragraphs.

dave
(hyatt@apple.com)

On Oct 7, 2007, at 12:11 AM, Michael Day wrote:

>
> Hi,
>
> 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:
>
> <p>Hello!</p>
> <div style="overflow: hidden"></div>
> <p>Hello!</p>
>
> 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,
>
> Michael
>
> [1] http://www.w3.org/TR/CSS21/box.html#collapsed-through
>
> -- 
> Print XML with Prince!
> http://www.princexml.com
>
Received on Monday, 8 October 2007 18:07:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:55 GMT