W3C home > Mailing lists > Public > www-style@w3.org > March 2000

Re: Heights of static block elements

From: Matthew Brealey <thelawnet@yahoo.com>
Date: Wed, 01 Mar 2000 12:15:24 -0800
Message-ID: <38BD79EE.688B@yahoo.com>
To: www-style@w3.org
I wrote:
> So better is:
> If it has block child boxes, the height is from the top padding edge of
> the element to the bottom border edge of the bottommost block child box
> (if this distance is negative, the height is 0). However, if the element
> has a non-zero bottom padding and/or bottom border, the content ends at
> the bottom margin edge of the bottommost child (again, if this distance is
> negative, the height is 0).

This is still incorrect.

1. The height is from the top content edge (not the top padding edge -
padding is not part of height) of the element.
2. I would prefer the term 'lowest bottom border edge', because the
phrase 'bottommost child box' is rather vague - in:

<div class=container>
<div style="height: 400px">
</div>
<div style="height: 200px; margin-top: -350px">
</div>
</div>

, the second DIV could be described as the bottommost child box, but the
border edge of the first DIV is below it.

3. The reference to 'child box' when referring to the case where the
element has bottom padding or border is in error; 'descendant box' is
preferable; for example:

<div class=container style="padding-bottom: 10px">
<div>
<div style="margin-bottom: -10px">
</div>
</div>
</div>

4. A block box could be nested inside an inline child box; in this case
there would not be any block child boxes.

Here's a revised version then:

If it has block descendant boxes, the height is from the top content
edge of the element to the lowest bottom border edge in descendant boxes
(if this distance is negative, the height is 0). However, if the element
has a non-zero bottom padding and/or bottom border, the content ends at
the lowest bottom margin edge of descendant boxes (again, if this
distance is negative, the height is 0).
Received on Wednesday, 1 March 2000 07:13:19 GMT

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