get the height of a div in css code example
Example 1: javascript get element width
var width = document.getElementById('myID').offsetWidth;//includes margin,border,padding
var height = document.getElementById('myID'). offsetHeight;//includes margin,border,padding
Example 2: how to get the height of a div in css
var clientHeight = document.getElementById('exampleElement').clientHeight;
alert(clientHeight);
var offsetHeight = document.getElementById('exampleElement').offsetHeight;
alert(offsetHeight)