2013-04-04 111 views
0

我检查了我在IE浏览器上的Tumblr主题,页脚位于页面中间,这里是我的代码。如何使用CSS获取液体页脚粘到底部?

#mastfooter { 
    background-color: #4F3117; 
    height: 295px; 
    clear: both; 
    margin-top: 0; 
    margin-right: auto; 
    margin-bottom: auto; 
    margin-left: auto; 
    width: 100%; 
    position: absolute; 
    left: 0px; 
    bottom: -38px; 
} 

是否有Internet Explorer 9解决方案?

+0

你能分享一个链接到页面吗? – davidb 2013-04-04 15:35:55

+0

你的html是什么 - 即#mastfooter坐哪? – Pete 2013-04-04 15:52:11

+0

@ davidb - 这是一个链接到页面。 http://lt-chocolate.tumblr.com/ – 2013-04-04 16:08:01

回答

0

瑞安既成事实拥有最佳的跨浏览器解决方案,粘页脚

See Here

但也有使用计算器上刚粘CSS页脚例子不胜枚举。

+1

我能够做到这一点,学习这个例子。谢谢 – 2013-04-04 17:04:41

+0

@LisaRamos将其标记为答案;) – davidb 2013-04-05 10:12:43

0

根据所提供的代码,我猜想,你需要将其更改为类似这个 -

#mastfooter { 
background-color: #4F3117; 
height: 295px; 
clear: both; 
margin-right: auto; 
margin-left: auto; 
width: 100%; 
position: fixed; /* keeps the footer visible even when scrolling*/ 
bottom: 0px; 

}

注意,顶部和底部边缘已被删除,他们最可能是定位问题的原因。