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

Re: Why no compositional positioning?

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Mon, 16 Mar 2009 10:18:37 -0400
Message-ID: <7c2a12e20903160718j6740456cge24dbc2f76044823@mail.gmail.com>
To: Thomas Davie <tom.davie@gmail.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style@w3.org
On Mon, Mar 16, 2009 at 10:08 AM, Thomas Davie <tom.davie@gmail.com> wrote:
> Maybe I am indeed missing something that is in css.  I'll give a simple
> example:
>
> <div id="a">
>  <div id="b">
>    <p>This is in div b</p>
>  </div>
> </div>
>
> #a
> {
>  position: absolute;
>  left: 100px;
> }
>
> #b
> {
>  position: parentRelative;
>  left: 10px;
> }

You just want:

#a
{
 position: absolute;
 left: 100px;
}

#b
{
 position: absolute;
 left: 10px;
}

position: absolute is not relative to the document root.  See, e.g.,
the example here:

http://www.w3.org/TR/CSS21/visuren.html#comp-abspos
Received on Monday, 16 March 2009 14:19:18 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:17 GMT