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

You need to flow the document in order to find width of G, so to transform
25% into 25px in P. Because computed values are found before used values,
the computed value of bottom in P is 25% and so the specified and computed
values in C, that lead to the used value of 0px

At least this is my interpretation

Giovanni

2009/2/12 Anne van Kesteren <annevk@opera.com>

>
> Given the following tree:
>
>  G
>    P
>      C
>
> ... 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
> <http://annevankesteren.nl/>
> <http://www.opera.com/>
>
>

Received on Thursday, 12 February 2009 19:10:47 UTC