请流体高度来看看这个代码CSS问题100%没有工作
HTML
<div id="wrapper">
<div id="header">
<div id="header_inner">
</div>
</div>
<div id="contentliquid">
<div id="content">
asdasdasdas
</div>
</div>
<div id="footer">
<div id="footer_inner">
</div>
</div>
</div>
CSS:
body, html{
margin: 0;
padding: 0;
}
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 13px;
color:#333;
}
p {
padding: 10px;
}
#wrapper {
width: 100%;
margin: 0 auto;
}
#header {
float: left;
height: 237px;
width: 100%;
}
#header_inner {
float: left;
height: 166px;
width: 60%;
top:30%;
position:relative;
background: #ff0000;
}
#contentliquid {
float: left;
width: 100%;
}
#content {
width: 100%;
background: #051f3b;
height:304px;
}
#footer {
height: 150px;
width: 100%;
clear: both;
}
#footer_inner {
height: 100%;
width: 60%;
background: #c0db09;
clear: both;
float:right;
}
蓝色
中间部分应该在高度100%,页脚应该在底部。目前中间部分不设置为100%,总之%不工作,而不是像素,即200px等,但我想中间部分是100% http://jsfiddle.net/RyDAw/
您是否希望它具有100%的视口高度或100%的页眉和页脚之间的空间高度,以便页脚始终粘在底部?内容可以比视口长吗? – insertusernamehere
只是想要在每个分辨率为100%的页眉和页脚之间的空间 – user2451541
内容部分100%高度不起作用, – user2451541