Revision: 52210
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at October 16, 2011 09:40 by dloop
Initial Code
$(document).ready(sizeContent); $(window).resize(sizeContent); function sizeContent() { var newHeight = $("html").height() - $("#subtract-all-other-divs").height() + "px"; $("#the-div-you-need-100%-height").css("height", newHeight); }
Initial URL
Initial Description
Declare html, body {height: 100%} in your css. Subtract all divs with a given height, such as a header, navigation and a footer. Like this: "#header" - "#navigation" - "#footer" + "px". Then add the element you need at 100% height.
Initial Title
Jquery: 100% Height (html, body)
Initial Tags
Initial Language
jQuery