Hi
I am facing a problem of getting the CSS height and width values of a DIV element for nearly two days now. I have tried all kinds of methods but I couldn't get it work.
I have a DIV which is defined by a CSS class in an external CSS file. The dimensions are 300x300. The thing is, I need to get the values inside the code.
Well, just for your information, I've been working on this problem for two days before I posted it here. That's first.
Second, the offsetHeight property calculates the height of the element after the rendering, i.e. adding the spacing values (padding, borders etc.). So this is not good for me.
But apparently all I had to do was change something in my code. I used getComputedStyle. Google that up.
Bookmarks