我正在使用如下所述的粘性页脚:
> 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-index,但这不起作用.顺便说一句,我需要位置:#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
最佳答案
解决了它,添加了一个位置:相对和z索引做到了:
.push,.footer {
height: 90px;
position: relative;
}
.push {
z-index: 9000;
position: relative;
}
.footer {
background: #181f18 url(../images/background-top.png) no-repeat center bottom;
z-index: 9999;
position: relative;
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。