Solution for "get the height of a div"

var width = document.getElementById('myID').offsetWidth;//includes margin,border,padding var height = document.getElementById('myID'). offsetHeight;//includes margin,border,padding

get height of div use js

//includes margin and padding document.getElementById('myDiv').offsetHeight; //without margin and padding document.getElementById('myDiv').clientHeight;

find div height in javascript

Similar codes for "get the height of a div"


Latest 'Javascript' questions

Added before "get the height of a div"