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

[css21] computed value of top/bottom for relative positioning

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 12 Feb 2009 19:51:25 +0100
To: www-style@w3.org
Message-ID: <op.uo85bzef64w2qv@annevk-t60.oslo.opera.com>

Given the following tree:


... with the following styles:

   G { height:100px }
   P { position:relative; bottom:25%; height:0 }
   C { position:relative; bottom:inherit }

http://www.w3.org/TR/CSS21/visuren.html#position-props states that for a  
relative positionined element the computed value of 'bottom' (which is  
also the inherited value) is defined in  
http://www.w3.org/TR/CSS21/visuren.html#relative-positioning However, that  
section states that the computed value of 'top' will be -bottom (i.e.  
-25%) because 'top' is auto (initial value), but it does not state what  
the computed value of 'bottom' is in that case which makes it unclear what  
'bottom' for element C means (i.e. is it 25% (leads to 0 here) or 25px).  
The releative positioning section should probably be more clear on what  
the computed value is here unless I'm missing something.

Anne van Kesteren
Received on Thursday, 12 February 2009 18:52:08 UTC

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