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

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -