Re: [CSS21] percentage values of 'top'

On Jun 4, 2009, at 7:22 AM, Anton Prowse wrote:

> CSS21 doesn't seem to permit ignoring the top:-50% here.  Percentage  
> values for 'top' refer to height of containing block, which, for  
> static or relatively positioned elements, is formed by the content  
> edge of the nearest block-level, table cell or inline-block ancestor  
> box.  It seems to me that UAs should be able to know what the height  
> of div.inner is (despite it depending upon the height of its child  
> p) and be able to honour top:x% on the child p.

I wonder about that too. Even positive percentages for 'top' only work  
if the containing block has an absolute height dimension. I've always  
had to estimate the height and give a negative pixel (or em) offset to  
perform that trick, but this is one case where the IE6 way is more  
powerful and useful, and less confounding. It is only one of the two  
or three things in IE6 that I can say that for (amongst the hundreds  
of things that are more confounding).

Received on Thursday, 4 June 2009 15:48:44 UTC