W3C home > Mailing lists > Public > www-style@w3.org > April 2008

Re: [cssom-view] Why is body's offsetParent null ?

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 23 Apr 2008 12:40:04 +0200
To: "Mike Wilson" <mikewse@hotmail.com>, "'Www-style'" <www-style@w3.org>
Cc: "'Daniel Glazman'" <daniel.glazman@disruptive-innovations.com>
Message-ID: <op.t917w2zd64w2qv@annevk-t60.oslo.opera.com>

On Wed, 23 Apr 2008 12:28:30 +0200, Mike Wilson <mikewse@hotmail.com>  
> Though, the CSSOM scheme will break down if you want to know the
> offset to the body element as there is no way to get at this
> information.
> In particular, as Garrett pointed out, this offset is available in all
> browsers except Opera (and CSSOM) when using position:relative on the
> body element:
> http://www.nabble.com/Re%3A--cssom-view--small-update-p16063070.html

Following that (special casing position:relative on the HTML body element)  
would break finding the position of an element within the page, as I  
explained here:


And as that's what these attributes are used for primarily I don't think  
that's a better solution.

Anne van Kesteren
Received on Wednesday, 23 April 2008 10:40:20 UTC

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