Re: Margin collapsing and overflow: hidden

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 UTC