Firebug tells me the computed style of my_div
:
width 300px
height 453.167px
Yet when I execute console.log(mydiv.style.height)
, it gives me an empty string, even though console.log(mydiv)
logs the correct element. I am sure the page has loaded by the time this logging code is called. I'd appreciate a solution that does not use jQuery.
Depending on the browser of choice, one of these will do:
mydiv.offsetHeight
mydiv.clientHeight
Get full height of a clipped DIV
Getting the height of a div
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With