扩展页面底部的页脚
我正在努力将页脚扩展到页面底部,我接近了给出的一些解决方案,但它似乎不起作用。
我想要它,以便 div bottomHalf
延伸到浏览器页面的底部。但由于某种原因,它不断超越它。
我怎样才能让它发挥作用?我在 body 包装器和 bottomHalf
中将高度设置为 100%
<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>
I was working on extending my footer to the bottom of the page, i came close to a few solutions i was given but it doesnt seem to work.
I want it so the div bottomHalf
extends to the bottom of the page on the browser. But for some reason it keeps going past it.
How can i get this to work? I put height to 100% in body wrapper and 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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)