- From: Aryeh Gregor <Simetrical+w3c@gmail.com>
- Date: Mon, 16 Mar 2009 10:18:37 -0400
- 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 UTC