W3C home > Mailing lists > Public > www-style@w3.org > September 2007

RE: "non-zero top border" in 8.3.1

From: Alex Mogilevsky <alexmog@exchange.microsoft.com>
Date: Thu, 6 Sep 2007 12:05:43 -0700
To: Ian Hickson <ian@hixie.ch>
CC: "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <04F36FB4ED0F85459AA447F72711526FFFE8360D7E@DF-GRTDANE-MSG.exchange.corp.microsoft.com>
Thanks for detailed explanation. I still have questions though...

> -----Original Message-----
> From: Ian Hickson [mailto:ian@hixie.ch]
> Sent: Tuesday, September 04, 2007 6:27 PM
> the word "Otherwise", and describes the two conditions that are the
> opposite of the condition for the first bullet point. How can they _not_

I agree, they are. I guess my biggest problem was that I tried to use the rules to explain any existing behavior and it wasn't possible without bending the rules...

> 8.3.1 specifically says: "Note that the positions of elements that have
> been collapsed through have no effect on the positions of the other
> elements with whose margins they are being collapsed; the top border edge
> position is only required for laying out descendants of these
> elements."

Yes, and the question we are trying to figure out is how nested empty blocks affect each other.

In this example (example 1 in http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/068.html)

    <style>
      .block        { height: 20px; background: silver; }
      .nothing      { }
      .topMargin    { margin-top: 40px; }
    </style>

    <div class="block"></div>
      <div class="nothing">
        <div class="topMargin">
        </div>
      </div>
    </div>

Q1: Should top border edge of "topMargin" be same as parent's (according to 8.3.1-6.1)?
Q2: Should top margin of "topMargin" affect its parent's position?
Q3: Should top margin of "topMargin" affect its own position?
Q4: Should positions of "nothing" and "top margin" be same as if "nothing" actually had content after any nested elements which margins collapse with its top margin (as in attached 068a.htm)?

In Firefox and Safari, the answers are  yes, yes, yes, yes
In IE and Opera the answers are         no,  no,  yes, yes

What does the spec expect? Is it        no,  no,  no,  no?

(in your test 068, I am still having trouble explaining the expected layout. If "nothing" is supposed to behave as if it had a top border, why doesn't the picture match the case where it has a top border? Layout in that case is 100% same in 4 browsers...)

Thanks
Alex



Received on Thursday, 6 September 2007 19:05:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:52 GMT