Re: Question on collapsing margins and block reflow context roots

On Wed, 26 Jan 2005, Boris Zbarsky wrote:
>
> So my questions are:
> 
> 1)  Do the margins of boxes with non-visible overflow set collapse with their
>     siblings?

Yes. They are still in-flow elements. The block formatting context root is 
just inside the element, as it were. (The difference with floated 
elements, positioned elements, and root elements is that these three are 
not in flow.)


> The reason I ask is that there may be some "replaced elements" (I put 
> that in quotes because they aren't quite) that effectively act like 
> block reflow context roots in some UAs (HTML's <button> and <fieldset> 
> come to mind), and it would be good to have a guideline as to how margin 
> collapsing should work for those elements.

IMHO the default rendering of <button> should be 'inline-block' and the 
default rendering of <fieldset> should be 'block', with the <legend> 
positioned over the border edge either via positioning or via extra-CSS 
means. But I acknowledge that this is not normatively defined anywhere.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 27 January 2005 11:58:14 UTC