0

如果您在Firefox中查看this,您會發現在調整大小,移動等時底部頁腳與窗口保持正確。它也從底部開始,沒有滾動條。然而,在IE8中,我無法讓它坐在開頭的底部,或者隨着窗口移動,可能還有其他一些問題。我從this site得到的代碼,它說它是IE兼容的,所以我必須做錯了什麼。我不得不改變代碼有點適合我的情況,但這裏的IE特定的CSS:IE8粘滯頁腳問題

* { 
margin: 0; 
} 

#container{ 
min-height: 100%; 
height: auto !important; 
height: 100%; 
margin: 0 auto -30px; 
} 

#footer, .push{ 
height: 30px; 
width: 100%; 
background: -moz-linear-gradient(top, #565656, #303030); 
background: -webkit-gradient(linear, left top, left bottom, from(#565656), to(#303030)); 
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#565656', endColorstr='#303030'); 
text-align:center; 
font-family: loginfont; 
font-size:13px; 
color: #fff; 
padding-top:5px; 
clear: both; 
} 

誰能告訴我什麼錯?在這一點上我完全無能爲力。我討厭IE ...

回答

1

我不確定,但它可以是padding-top:5px;這是造成這個問題。嘗試將margin: 0 auto -30px;更改爲margin: 0 auto -35px;,看看是否有幫助。

0

在你#container添加<div class="push"></div>並添加position:relative;#container負利潤率不會靜態定位元素的工作。