在每页上保持页脚

时间:2014-07-31 14:08:02

标签: tumblr

我试图将我的页脚保持在每个页面的底部(不粘)。此刻它正在屏幕中间盘旋。

这是my site

这是我目前的代码 -

HTML -

<footer id="footer">
<a class="right">All Rights Reserved © 1-800 Dinosaur 2014 </a> 
</div>
</footer> <!-- footer --->

CSS -

#footer {
-moz-box-sizing: border-box;
background: transparent;
bottom: 0;
color: #444444;
font-family: 'Helvetica Neue',Helvetica,sans-serif;
font-size: 15px;
font-weight: 600;
height: 100px;
left: 0;
overflow: hidden;
padding: 44px;
position: absolute;
right: 0;
text-align: center;
width: 100%;
}
#footer a {
-moz-box-sizing: border-box;
background: transparent;
bottom: 0;
color: #FFFFFF;
height: 100px;
left: 0;
padding: 44px;
position: absolute;
right: 0;
text-align: center;
width: 100%;
}
#footer a:hover {
color: #000000;
}
#footer a:active {
background: transparent;
}
#footer .last-page {
text-align: center;

我做错了什么?

1 个答案:

答案 0 :(得分:0)

根据我的经验,只有在指定具有相对定位的父级中,绝对定位才有效。尝试将您的页脚放在一个div中,其中style =“position:relative;”并看看是否有效。它实际上看起来像你已经在你的代码片段中包含了一个没有打开的div标签。

相关问题