"document.getelementById(el).style.padding" only works if the style is set inline. Additionally, some browsers only return padding (and border, etc.) for a specific edge (e.g. "paddingBottom") when pulling from stylesheet (via "computedStyle").
Can you post an example of the broken code?
Shruti Krishnagiri wrote:
I don’t quite understand why Dom.getStyle(el, "padding") doesn’t work while document.getelementById(el).style.padding works just fine when the style is defined in a stylesheet. Does this have something to do with the style not being defined in the html element?