How to make footer stay at the bottom

Hi @Yn_Nik_Stuntman and @timmse,

I’m using this jQuery code for lack of a better solution. Maybe someone will have a CSS solution instead:

jQuery(function($){
function stickyFooter(){
var footer = $(ā€œfooterā€);
var position = footer.position();
var height = $(window).height();
height = height - position.top;
height = height - footer.outerHeight();
if (height > 0) {
footer.css({ā€˜margin-top’ : height+ā€˜px’});
}
}
stickyFooter();
$(window).resize(function(){
stickyFooter();
});
});

1 Like