我使用的是粘页脚不可点击状中描述:Link在粘页脚在Firefox和Chrome
- How do you get the footer to stay at the bottom of a Web page?
- http://ryanfait.com/resources/footer-stick-to-bottom-of-page/
我有,我想一个链接一个段落在页面的底部,所以我把它放在.footer中。
问题是Firefox 3.5.2和Chrome中的链接不可点击,它位于.push后面。它在IE7和IE8中工作,但我想这不会说太多。
我已经玩弄了Z指标,但那不起作用。顺便说一句,我需要的位置:在#page中的相对位置在该div内的一些东西。
有没有一种方法可以在所有浏览器中的.footer中单击链接?
代码的相关部分:
CSS
html, body {
height: 100%;
}
#page {
width: 962px;
text-align: left;
min-height: 100%;
/* sticky footer part */
height: auto !important;
height: 100%;
margin: 0 auto -90px;
/* end sticky footer */
position: relative;
}
/* sticky footer part */
.push, .footer {
height: 90px;
}
.push {
}
.footer {
background: #181f18 url(../images/background-top.png) no-repeat center bottom;
}
HTML
<div id="page">
<div id="wrapper">
<div id="contents">bla bla</div>
</div>
<div id="footer">bla bla</div>
<div class="push"></div>
</div>
<div class="footer">
<p><a href="http://www.some-site.com/">Some Text</a></p>
</div>
是跨浏览器兼容的推动和页脚类也需要相对的z-index的位置得到认可。 – 2009-09-19 14:42:15
请用奥斯汀的评论更新您的答案。它真的为我节省了很多时间。 – 2013-09-22 20:29:24
@Johnny_D好点,我添加了它。 – jeroen 2013-09-23 05:30:50