我正在做一個非常簡單的網站,我已經得到了我的頁腳一個問題:它沒有中心。我已經完成了所有的餘裕:auto;和正確的事情,問題仍然存在於Chrome和Firefox中。代碼:頁腳不響應中心命令
#footer {
position: fixed;
z-index:10;
margin-left: auto;
margin-right: auto;
width: 1000px;
height:35px;
bottom:0px;
background-color:#363636;
/* Style info that has nothing to do with the problem below this line */
box-shadow: 1px -2px 6px rgba(0, 0, 0, 0.5);
-webkit-box-shadow:1px -2px 6px rgba(0, 0, 0, 0.5);
-moz-box-shadow:1px -2px 6px rgba(0, 0, 0, 0.5);
border-top-left-radius: 10px;
-moz-border-top-left-radius: 10px;
-webkit-border-top-left-radius: 10px;
border-top-right-radius: 10px;
-moz-border-top-right-radius: 10px;
-webkit-border-top-right-radius: 10px;
}
已嘗試輸入「display:inline-block;」。 index.html代碼(ofc它仍然在開發中,什麼也沒有):http://d.pr/btSa
在此先感謝。
感謝,它sorta工作,但它不停留在頁面的底部無w/o位置固定。底部:0像素;似乎沒有工作。在這裏:http://d.pr/cVPT – 2012-02-19 02:56:52
我已經更新了我的答案,使用你的'postion:fixed'的解決方案。 – 2012-02-19 03:02:36
像魅力一樣工作。謝謝你:D – 2012-02-19 03:04:20