I am calculating the window height and other elements height and making the footer stay at bottom. I tried with JavaScript but the footer is only taking the header element height and aligning the footer just below the header. I wanted to make the footer stay at bottom with the help of JavaScript. Using position as fixed in css clips the content. I want the footer to grow as and when the content grows. Thats the reason i am trying to achieve this in JavaScript or JQuery and not pure CSS.
$(document).ready(function() {
function pageheight() {
debugger
var ContainerMinHeight = ($(window).height()) - (($("header").height()) + ($("footer").height() + 27));
$("body").css("min-height", ContainerMinHeight);
}
pageheight();;
});