Re: percent heights within shrinkwrap (auto height)

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 UTC