How can i access the style declaration of an element specified using external or embedded stylesheet.For ex: how to access the width property of an element which is defined in an embeded stylesheet using the id selector..
I know CSSRules object can do this…But it is browser dependent.For ex:in chrome ,the object is null…So what is the browser independent way to do this?
How can i access the style declaration of an element specified using external or
Share
This is really browser dependent… I have a bit of code which I use to make an auto-expand text area, adapted from code found there.
Note, the
$function here is from Prototype.The
getStyle()function from Prototype is defined this way, you should be able to easily adapt it to your needs.