var footerheight = $("footer").height();
$("#body2").css("padding-bottom",footerheight);
$("footer").css("margin-top",footerheight);
$("footer").css("height",footerheight);
$(window).resize(function(){
$("#body2").paddingBottom("auto");
var footerheight = $("footer").height();
$("#body2").css("padding-bottom",footerheight);
$("footer").css("margin-top",footerheight);
$("footer").css("height",footerheight);
});
Is there a way to convert the "footerheight" variable into a negative value before using it as the margin-top in the footer's styling?