I need the full height of a div, I\'m currently using
document.getElementById(\'measureTool\').offsetHeight
offsetHeig
var el = document.querySelector('div');
var elHeight = el.offsetHeight;
elHeight += parseInt(window.getComputedStyle(el).getPropertyValue('margin-top'));
elHeight += parseInt(window.getComputedStyle(el).getPropertyValue('margin-bottom'));
console.log(elHeight);
https://jsfiddle.net/gbd47ox1/
I think this solution is more readable, but none of the solutions presented account for sizes that aren't pixels... :(