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 -

c# - Abstract method in public abstract class implementing an internal interface doesn't compile? -

authentication - Mongodb revoke acccess to connect test database -