Javascript examples for CSS Style Property:height
Calculate CSS box height by hand
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from w w w. j a v a 2 s .c o m var height= document.getElementById('test').offsetHeight; console.log(height) } </script> </head> <body> <div id="test" style="padding: 15px; background-color: #ccc; font-size: 18px; line-height: 1.4em;"> text </div> </body> </html>