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

Re: percent heights within shrinkwrap (auto height)

From: fantasai <fantasai@escape.com>
Date: Wed, 25 Oct 2000 17:13:12 -0400
Message-ID: <39F74CE8.3C39F3E6@escape.com>
To: www-style@w3.org
Ian Hickson wrote:
> 
> On Tue, 24 Oct 2000, fantasai wrote:
> >
> > 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%
> 
> So what would it do with?:
> 
>   <tr>
>     <td height=190>
>       content (which may cause the height to be greater than 190px)
>     </td>
>     <td>
>       <div style="height: 150%">
>       content
>       </div>
>     </td>
>   </tr>
> 
> (150%)

The cell only displays [100% percent of row height] of the cell content; the
rest gets clipped to the precalculated row height.
 _________________   _                     _
|       |         |   |                     |
|       |         |   |__ Cell height       |
|       |         |   |   (basis for 100%)  |__ full cell content height
|_______|_________|  _|                     |   (contains only 1 div @ 150%)
        |(clipped)|                         |
        |_________|                        _|

In other words, the height of the cell is calculated first, then the div's
height is calculated with respect to that value. The row is not reflowed to
accommodate the div.

I don't say that IE has the perfect implementation when you get to the details,
but IMO, it's more flexible than the CSS2 default to 'auto'. It allows layouts
that aren't possible otherwise. (You can always just leave it as 'auto'.)

Also...
<td>
<div style="height: 50%">
content
</div>
</td>

Maybe that could be rendered as 50% of the auto height?
Received on Wednesday, 25 October 2000 17:13:10 GMT

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