Re: Inconsistent position:relative behaviour

On 13/02/2011 17:58, Boris Zbarsky wrote:
> On 2/13/11 6:03 AM, Markus Ernst wrote:
>>> Fwiw, setting the parent to overflow:auto would prevent margin collapse
>>> too, at the possible cost of scrollbars you may not want.
>>
>> In my naive understanding, the spec implies that a "clear" property
>> with a value other than "none" would turn off margin collapsing:
>>
>> "The top margin of an in-flow block box is adjoining to its first
>> in-flow block-level child's top margin if the element has no top
>> border, no top padding, and the child has no clearance."
>
> That's the thing. "clearance" doesn't mean "'clear' not set to none" it
> means "'clear' affected the margins of this element, because there were
> floats it had to clear". Like I said, the interaction is complicated.
> This text would be clearer (no pun intended) if it talked about the
> child having nonzero clearance, I think.

No, non-zero clearance is not the same thing as not having clearance, 
precisely in that margin collapsing is prevented when an element has 
(possibly zero) clearance.

Cheers,
Anton Prowse
http://dev.moonhenge.net

Received on Sunday, 13 February 2011 22:47:39 UTC