Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Element.getStyle returns 0 for auto margins #2279

fozcode opened this Issue · 1 comment

3 participants


If you set an element with CSS margin: auto, Element.getStyle('margin') returns 0px. This might be a "feature", but it's also an inconsistency as the same code works correctly when the margin is set to a pixel value.

Here's a demo that shows my problem. If you use getStyle then setStyle, some styles are retained correctly while 2 of the 3 margins are lost.

@fakedarren fakedarren closed this

why closed? related to #2328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.