http://jsfiddle.net/YZdv4/50/ 这里是 jsfiddles
更新:我想你可以用绝对定位和javascript来做到这一点;但是,是否有任何仅使用 css/floats 的解决方案?
抱歉,如果这很难理解,但我正在尝试通过使col 为父级的 100% 高度来使紫色 bg#content
变为background:papayawhip
#right
#content
<div id="container" class="cf">
<div id="header">
<p>im header</p>
</div>
<div id="content" class="cf">
<div id="left"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce viverra enim sit amet ante lacinia iaculis. Nullam ac nulla vel purus posuere luctus. Mauris a elit nisl. Mauris commodo convallis sem in feugiat. Suspendisse mauris leo, molestie sit amet commodo eget, mollis a nibh. Suspendisse auctor commodo interdum. Aliquam posuere, erat eget pharetra hendrerit, mi tellus tristique tellus, vel accumsan elit nisi ac diam. Morbi consequat ligula est, et volutpat ante. Curabitur pulvinar nulla non neque iaculis pulvinar sed eu sapien. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce sodales metus et nisl dictum non ullamcorper magna blandit. Aliquam erat volutpat. Aenean id massa sed massa sollicitudin euismod sed non lorem. Sed accumsan, nisl vitae adipiscing cursus, magna enim accumsan augue, a rutrum mauris lorem non mauris. Sed consequat venenatis venenatis.
</P></div>
<div id="right">
<img src="http://vvcap.net/db/0ggWsnKKw1FI1w0xojUT.png" />
<img src="http://vvcap.net/db/Rik9UwaQOUuhKpML16td.png" />
</div>
</div>
<p>im the container</p>
</div>
div#container{background:yellow;min-height:500px;}
div#header{background:pink; height:100px;}
div#content{position:relative;background:purple; height:100%;}/*heres parent container*/
div#content #left{float:left; height:100%; background:#222; color:#fff;width:50%;}
div#content #right{float:left; height:100%; background:papayawhip;width:50%;}
div#content #right img{}
/* For modern browsers */
.cf:before,
.cf:after {
content:"";
display:table;
}
.cf:after {
clear:both;
}
/* For IE 6/7 (trigger hasLayout) */
.cf {
*zoom:1;
}
</p>
</p>