0

I have an div and I don't set any style to it, then I put some content into it, so it height could grows

Now I want to get its height in IE8 or IE7, which have not getComputedStyle method

If I use currentStyle property, the return value is auto, not the number;

How can I get the height in IE?

hh54188
  • 14,887
  • 32
  • 113
  • 184

1 Answers1

2

Don't use getComputedStyle, use clientHeight or offsetHeight depending on wether you want borders included in the total.

https://developer.mozilla.org/en-US/docs/Determining_the_dimensions_of_elements

SpliFF
  • 38,186
  • 16
  • 91
  • 120