Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Trouble with Dom.getStyle

Expand Messages
  • Matt Sweeney
    Hi Shruti, document.getelementById(el).style.padding only works if the style is set inline. Additionally, some browsers only return padding (and border,
    Message 1 of 2 , Jan 3, 2007
    • 0 Attachment
      Hi Shruti,

      "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?

      Thanks,

      Matt

      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?


    Your message has been successfully submitted and would be delivered to recipients shortly.