javascript - white space at the bottom of page -
javascript - white space at the bottom of page -
the problem have site keeps giving big white space on bottom of page, thought why happening?
i have css on content:
#content{ width: 990px; margin: 0 auto; min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -40px; position: relative; } .full-background { z-index: -999; min-height: 100%; min-width: 1024px; width: 100%; height: 100%; position: fixed; top: 0; left: 0; }
and i´m using script fit background image window:
function fittobox(){ $('.fittobox').each(function(){ $(this).fittobox(); }) } $(window).bind({ 'load' : fittobox, 'resize' : fittobox })
update function
// fittobox jquery.fn.fittobox = function(){ var div = this.parent(); var img = this; var imar = img.attr("height") / img.attr("width"); var bgar = div.height() / div.width(); if(imar >= bgar){ img.attr("width" , div.width()); img.attr("height" , div.width() * imar); }else{ img.attr("height" , div.height()); img.attr("width" , div.height() / imar); } div.css({ "position" : "absolute", "overflow" : "hidden" }); img.css({ "position" : "absolute", "left" : (div.width() - img.attr("width"))/2, "top" : (div.height() - img.attr("height"))/2 }); img.fadein(); };
thanks!
if remove body height:100% , create #footer position:absolute there no gap.
javascript jquery html css
Comments
Post a Comment