I have 3 divs with ids header, content and footer. Header and footer has fixed height and they are styled to float on top and bottom.
header
content
footer
You can bind function as follows, instead of init on load
$("div").css("height", $(window).height()); $(window).bind("resize",function() { $("div").css("height", $(window).height()); });