Re: Inconsistent position:relative behaviour

On 13/02/2011 23:47, Anton Prowse wrote:
> 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.

Sorry, what I meant to say was:

Having zero clearance is not the same thing as not having clearance [...].

That is, clearance is a property which an element may possess, and one 
of its characteristics is prevention of certain margin collapsing.  (The 
/size/ of the clearance is actually just a technical detail, and may be 
negative, zero or positive.)

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

Received on Sunday, 13 February 2011 22:54:10 UTC