You can use 'client' and 'offset' variants of width and height properties to get the dimensions of elements. The 'clientWidth' and 'clientHeight' properties capture element sizes including padding only. The 'offsetWidth' and 'offsetHeight' properties capture the full size of the element including padding, margin and border.
#javascript#element
// Element sizes including paddingelement.clientHeight;element.clientWidth;// Element sizes including padding, margin and borderelement.offsetHeight;element.offsetWidth;