動態粘我有問題,我的XHTML頁面頁腳的HTML頁面...我希望把頁腳總是在頁面的結束,在它的底部,所以,當頁面內容很差,頁腳會粘在屏幕的底部,但是當頁面長得多時,它會在頁面的最後內容之後粘到頁面上。頁腳對底部
我該怎麼做?
這是我的CSS文件
html {
height:98%;
margin: 0 auto 0 auto;
width:1280px;
padding:2px;
padding-bottom:0px;
}
body {
overflow:auto;
width:100%;
margin: 0 auto 0 auto;
height:100%;
}
#container {
min-height:100%;
height:100%;
margin:0 auto -50px;
}
#box {
min-height:100%;
}
#push {
height:50px;
clear:both;
}
#footer {
height:50px;
clear:both;
position:relative;
bottom:0px;
width:100%;
}
而且我的網頁
<html>
<h:head></h:head>
<h:body>
<div id="conatiner">
<div id="box">
<header></header>
<div id="externalborder">
<div id="push"></div>
<div id="footer"></div>
</div>
</div>
</h:body>
</html>
[使頁腳正確粘貼到頁面底部]的可能的副本(http://stackoverflow.com/questions/3443606/make-footer-stick-to-bottom-of-page-correctly) –
您是否必須支持最終版本的IE?你可以使用'計算的()' – DaniP
它不是一個重複的,因爲在其他職位的要求是不同的那種....我不得不使用它主要是Chrome和Firefox,我怎麼能使用計算()? – RevivedPicard