On Friday, 13 May 2011 01:03:53 UTC-3, Joel Dart wrote:
>
>  The problem is not with the rendering in those browsers.  The problem is 
> that the return value of window.getComputedStyle(test, 
> null).getPropertyValue("margin-left") is “0px” which is clearly not the used 
> value for margin-left.
>
>
According to the CSS 2.1 spec, a computed value of 'auto' for 
'margin-left'<http://www.w3.org/TR/CSS21/box.html#propdef-margin-left>or 
'margin-right' 
<http://www.w3.org/TR/CSS21/box.html#propdef-margin-right>becomes a used value 
of '0':
<http://www.w3.org/TR/CSS21/visudet.html#Computing_widths_and_margins>
 

>  
>
> Also, to be clear, I wasn’t looking for a workaround for this issue but 
> just looking for a second opinion if this is a bug that happens to be 
> implemented cross most of the major browsers.  It was the consistency that 
> made me feel like I must be incorrect.
>
>  
>
It doesn't seem to be a bug.

Also, strictly for getting dimensions I’ve had good success with 
> getBoundingClientRect<https://developer.mozilla.org/En/DOM/Element.getBoundingClientRect>,
>  
> but that’s another discussion :-]
>
There are some problems with this getBoundingClientRect() method, according 
to:
<http://www.quirksmode.org/dom/w3c_cssom.html>

Cheers,
Joao Rodrigues 

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to