1
我一直致力于将页脚扩展到页面底部,我接近几个我给出的解决方案,但它似乎不起作用。扩展页脚底部
我想要它,因此div bottomHalf
延伸到浏览器页面的底部。但由于某种原因,它不断超越它。
我如何得到这个工作?我把高度为100%的身体包装和bottomHalf
<style type="text/css">
html, body {
margin: 0;
padding: 0;
height: 100%;
background-color: #F0E4C9;
font-family:"Times New Roman", Times, serif;
}
#wrapper {
margin: 0 auto;
width: 990px;
position: relative;
min-height: 100%;
height: 100%;
}
#topHalf {
margin: 0 auto;
width: 990px;
height: 435px;
background-color:#960;
}
#navigation {
margin: 0 auto;
width: 990px;
height: 55px;
background-color:#0CF;
}
#bottomHalf {
margin: 0 auto;
width: 990px;
min-height: 100%;
height: 100%;
background-color: #4d3c37;
color: #FFF;
}
</style>
<div id="wrapper">
<div id="topHalf"></div>
<div id="navigation"></div>
<div id="bottomHalf">EXTEND THIS TO BOTTOM OF PAGE, GOES TO FAR</div>
</div>
你试过定位绝对底部,在底部'的div:0'?看看[这个问题](http://stackoverflow.com/questions/42294/how-do-you-get-the-footer-to-stay-at-the-bottom-of-a-web-page )以及那里的一些答案。 –