Get div height with plain JavaScript -


any ideas on how div's height without using jquery?

i searching stack overflow question , seems every answer pointing jquery's .height().

i tried mydiv.style.height, returned nothing, when div had width , height set in css.

var clientheight = document.getelementbyid('mydiv').clientheight; 

or

var offsetheight = document.getelementbyid('mydiv').offsetheight; 

clientheight includes padding.

offsetheight includes padding, scrollbar , borders.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -