我在 http://s361608839.websitehome.co.uk/testsite/ 有一个正在处理的页面
基本上 div #footer 应该位于页面底部,因为它出现在标记的末尾,而且它也在 #wrapper 之外。
HTML :
<div id="footer">This footer text should be underneath the white box (at the bottom)</div>
CSS:
#footer{
width: 960px;
margin: 0 auto;
color: #FFF;
}
我尝试向 CSS 添加一个 clear:both
,因为我认为可能是页面中某处的 float 导致了这种情况,但它似乎没有做任何事情。
任何帮助都将不胜感激。
谢谢
最佳答案
将您的#header 位置更改为相对位置并删除#register 上的“顶部”声明,一切都恢复正常!
绝对定位会对页面流造成严重破坏,因此在使用时请牢记这一点!
关于css - 在页面底部放置一个 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10342936/