Html 带页脚的100%容器高度
我正在做的页面有问题 代码片段:Html 带页脚的100%容器高度,html,css,Html,Css,我正在做的页面有问题 代码片段: <div id="header"> // header.. </div> <div id="content"> // content where ajax is loaded (should be atleast 100% of the site height) <!-- ajax --> </div> <div id="footer"> //empty atm. </di
<div id="header"> // header..
</div>
<div id="content"> // content where ajax is loaded (should be atleast 100% of the site height)
<!-- ajax -->
</div>
<div id="footer"> //empty atm.
</div>
我希望容器从页眉到页脚,我尝试应用我找到的代码和提示,但没有成功。感谢您的回答
#content{
height:100%;
}
这意味着contentdiv占据了父容器的100%,在本例中是html
所以写
html{
height:100%;
}
看看这个:
html{
height:100%;
}