fix sticker footer

This commit is contained in:
captainill 2015-11-09 22:21:39 -08:00
parent 348fd81b75
commit 8d847a9ac4
1 changed files with 4 additions and 4 deletions

View File

@ -25,7 +25,7 @@ var Init = {
resizeImage: function(){ resizeImage: function(){
var header = document.getElementById('header'), var header = document.getElementById('header'),
footer = document.getElementById('footer-wrap'), footer = document.getElementById('footer'),
main = document.getElementById('main-content'), main = document.getElementById('main-content'),
vp = window.innerHeight, vp = window.innerHeight,
bodyHeight = document.body.clientHeight, bodyHeight = document.body.clientHeight,
@ -33,7 +33,7 @@ var Init = {
fHeight = footer.clientHeight, fHeight = footer.clientHeight,
withMinHeight = hHeight + fHeight + 830; withMinHeight = hHeight + fHeight + 830;
if(withMinHeight > bodyHeight ){ if(withMinHeight < vp && bodyHeight < vp){
var newHeight = (vp - (hHeight+fHeight)) + 'px'; var newHeight = (vp - (hHeight+fHeight)) + 'px';
main.style.height = newHeight; main.style.height = newHeight;
} }