我有这样的CSS代码:CSS股利不会100%的高度,我的内容
html, body {
font-family:Arial;
padding:0;
margin:0;
background:#0CF;
height:100%;
}
#wrapper {
width:100%;
height:100%;
}
#page-body {
width:75%;
min-height:600px;
height:100%;
border-top:5px solid #c6d6e9;
background:#c6d6e9;
margin:10px auto 30px auto;
padding:10px;
}
#page-body-inner {
width:100%;
margin:0 auto 0 auto;
}
.page-left {
display:inline;
float:left;
width:190px;
}
.page-right {
display:inline;
float:left;
width:700px;
height:100%;
margin-left:15px;
}
出于某种原因,在右边的内容的高度是不是100%这样的文字熄灭的分度,背景颜色。
这里是一个小提琴:http://jsfiddle.net/yKCJG/
尝试'显示:直列block'你不能'inline'对象设置的尺度,你也可能要使用min-height 100%在你的html和body上,就好像你的内容长于你的viewport它会被截断 – Pete
不要使用height:100%use height:auto –