我有這樣的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 –