页脚在IE10中从页面底部向上移动

时间:2013-04-05 16:46:53

标签: css internet-explorer-10 sticky-footer

我正在开发一个MVC网站,我无法在IE10中让页脚停留在页面底部。出于某种原因,它会在页面加载时出现在窗口的底部,但是即使向下滚动它也会保持在相同的位置,因此页脚不再位于页面的底部。

奇怪的是,当您调整窗口大小时,页脚会固定在页面底部。当您将页面恢复为完整大小时,页脚仍然固定在页面底部。如果您刷新页面或转到新页面,则页脚不再固定在页面底部。

我尝试了一些CSS解决方案来创建Sticky Footer,他们已经在Firefox,Chrome和所有旧的IE中工作,但不是IE10。我尝试了ryanfait's solutioncssstickyfooter,但都没有为我工作。

目前我的页脚有以下CSS代码:

#footer{background:#098a9d url(../img/headFootShadow.png) repeat-x 0 -8px;padding:20px 0 0;display:block;height:65px;margin-top:30px;color:#fff}
#footer a{color:#FFF;font-weight:700;text-decoration:none}
#footer a:hover{text-decoration:underline}

/*Sticky footer hack*/

html, body {height: 100%;}
html#lightbox{height:auto;}
#fullWrap {min-height: 100%;}
#main {overflow:auto;padding-bottom:105px;}  /* must be same height as the footer*/
#footer {position: relative;margin-top: -85px; /* negative value of footer height  */height:65px;clear:both}

正如我所说,这适用于Chrome,Firefox和旧IE,但不适用于IE10。有谁知道如何解决这个问题或可行的解决方法?任何帮助将不胜感激。

非常感谢

伯纳德

0 个答案:

没有答案
相关问题