mootools/mootools-core — Issue #2279: Element.getStyle returns 0 for auto margins
Author: blueklein76
Created: 2012-02-07 14:49:33+00:00
State: open

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.

http://jsfiddle.net/YyK5D/1/