Re: [CSS2.1] Visual formatting model: Floats and Positioning

On Tue, 21 Oct 2003, fantasai wrote:
>
> I can't think of any cases where clearance would cause the element
> to go up, so "typically" should not be there to imply that there
> are some.

   <block-a><float/></block-a>
   <block-b/>

   * { border: solid; } /* assume border is present but infinitesimal */
   float { height: 3em; }
   block-a { margin-bottom: 2em; }
   block-b { margin-top: 2em; }

The clearance on block-b is -1em, so the clearance moves the element up
by one em (relative to where it would be if the margins didn't collapse
but the clearance was 0 -- clearance first uncollapses the margins (per
the rules in 8.3.1) and then moves the block relative to where that box
ends up after uncollapsing).

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
U+1047E                                         /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 31 October 2003 10:53:44 UTC