Javascript for height: 100%;


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <script type="text/javascript">
  2. var h = document.getElementById("mainContentID").offsetHeight;
  3. document.getElementById("menuID").style.height = h + "px";
  4. </script>

URL: http://www.mikedoesweb.com/2011/01/100-height-div-with-2-lines-of-code/comment-page-1/#comment-1167

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.