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

Re: [CSSOM] resolved value for top/left/bottom/right doesn't match most browsers

From: Øyvind Stenhaug <oyvinds@opera.com>
Date: Wed, 14 Mar 2012 14:46:51 +0100
To: www-style@w3.org
Message-ID: <op.wa5xwdotbunlto@oyvinds-desktop>
On Wed, 14 Mar 2012 13:45:02 +0100, Mike Sherov <mike.sherov@gmail.com>  
wrote:

> Currently, IE, FF, and Opera return the "used value" for
> top/left/bottom/right when "display" is not "none". Webkit returns the
> "computed value".

Actually, that's not quite true. IE and Opera resolve percentages, but not  
'auto', for instance (possibly this is closer to what "computed value" was  
supposed to mean in CSS 2.0 though I'm not sure). Even Firefox deviates  
 from the used value in the cases of 'relative' and 'static' position.

In particular, for <div style="position: relative; top: 50px; bottom:  
10px"></div> all the above browsers return 10px for 'bottom'. Though if  
existing content doesn't rely on that, changing it would be nice.

-- 
Øyvind Stenhaug
Core Norway, Opera Software ASA
Received on Wednesday, 14 March 2012 13:47:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:51 GMT