我遇到了无法将版权页脚移到页面底部的困境,目前它坚持在我的页面中间,因为某种原因,当我尝试在谷歌浏览器中检查元素时它告诉我我的容器只有 471px 的高度(我屏幕的一半)....但是我没有在代码中的任何地方限制我的高度,只有 100% 的最小高度,所以我很茫然.. 任何帮助将不胜感激. 谢谢 :)
我会发布一张图片,但我需要 10 次重复……才能做到这一点……
这些是我的 CSS:
html, body{
height:100%;
}
body {
font-family: '', sans-serif;
font-size:16px;
color:#33767d;
text-align:left;
background-image:url();
background-repeat:no-repeat;
background-color:#FFF;
position:relative;
margin:0;
}
#container {
float:none;
margin:0px;
width: 85%;
margin-top:20px;
position:relative;
margin-bottom:0;
min-height:100%;
}
#footer {
position:absolute;
width:auto;
text-align:center;
font-size:8px;
color:#54c0cc;
font-family:'', sans-serif;
text-transform:uppercase;
top:100%;
left:40%;
height:60px;
}
和我的 HTML:
<body>
<div id="container">
--> 徽标和导航栏和联系信息在这里
<div id="footer">
All Images © 2013 . All Rights Reserved.
</div> //div end footer
</div> //div end container
</body>