W3C home > Mailing lists > Public > www-style@w3.org > June 2009

Re: [CSS21] percentage values of 'top'

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 4 Jun 2009 08:48:04 -0700
Cc: "www-style@w3.org" <www-style@w3.org>
Message-Id: <AA74C884-9AFB-480F-9DD7-144C4F72653C@gmail.com>
To: Anton Prowse <prowse@moonhenge.net>

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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:27 UTC