RE: "non-zero top border" in 8.3.1

Thanks for detailed explanation. I still have questions though...

> -----Original Message-----
> From: Ian Hickson []
> 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

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

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

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...)


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