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

percent heights within shrinkwrap (auto height)

From: fantasai <fantasai@escape.com>
Date: Tue, 24 Oct 2000 21:51:26 -0400
Message-ID: <39F63C9E.4C29E140@escape.com>
To: www-style@w3.org
Given the following snippet within a table cell:

<div style="height: 50%">
Some content
</div>

>> What happens? <<


There are several scenerios possible:
----------------
With the height explicitly specified on the containing cell:
 
  <tr>
    <td>
      content
    </td>
    <td height=190>
      <div style="height: 50%">
      content
      </div>
    </td>
  </tr>
 
  Which would make 50% = 95px. This is defined in CSS; the others are, to the
  best of my knowledge, not.
----------------
With the height specified on another cell in the row:
 
  <tr>
    <td height=190>
      content (which may cause the height to be greater than 190px)
    </td>
    <td>
      <div style="height: 50%">
      content
      </div>
    </td>
  </tr>
----------------
And without any height defined in the row at all:
  <tr>
    <td>
      <div style="height: 50%">
      content
      </div>
    </td>
  </tr>
----------------

IE5 renders the second one in what is, IMO, a most intuitive way; it uses
the height it /can/ calculate (from the other cell) as the basis for 100%
Received on Tuesday, 24 October 2000 21:51:06 GMT

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