On this site,你会看到页脚卡在左边。这是CSS:
#footer {
width: 800px;
clear:both;
float:right;
position:relative;
left:-50%;}
请让我知道为什么会这样。
谢谢,
塔拉
答案 0 :(得分:2)
你应该保持简单并使用:
#footer {
width: 800px;
clear: both;
margin: 0 auto; /* center it */
}
这与您在.container
上已成功使用的技术完全相同。
答案 1 :(得分:0)
将页脚居中:
#footer {
width:800px;
position:absolute;
padding-left:50%;
margin-left:-400px;
bottom:0px;
}
答案 2 :(得分:0)
#footer {
position:absolute;
bottom:0px;
width:100%;
}