如果您已经在使用像 Foundation 这样的框架,不确定这是否是一个好的解决方案;但请查看这篇文章:等高列 - 跨浏览器。
另一种解决方案是使用背景颜色;但是,它依赖于 CSS3。例如:
.container{
width: 100%;
background-image: -webkit-gradient(linear, left top, right top, color-stop(0, #aaa), color-stop(66.7%, #aaa), color-stop(66.7%, #333), color-stop(100%, #333));
background-image: -webkit-linear-gradient(left, #aaa 0, #aaa 66.7%, #333 66.7%, #333 100%);
background-image: -moz-linear-gradient(left, #aaa 0, #aaa 66.7%, #333 66.7%, #333 100%);
background-image: -ms-linear-gradient(left, #aaa 0, #aaa 66.7%, #333 66.7%, #333 100%);
background-image: -o-linear-gradient(left, transparent 0, #aaa 66.7%, #333 66.7%, #333 100%);
background-image: linear-gradient(left, #aaa 0%, #aaa 66.7%, #333 66.7%, #333 100%);
}
.container:after{
display: table;
float: none;
content: "";
}
.container .column1{
max-width: 66.7%;
width: 100%;
float: left;
}
.container .column2{
max-width: 33.3%;
width: 100%;
float: left;
}
百分比应该与您的块大小相同。该示例适用于两列。如果您的标记与此类似:
<div class="container">
<div class="column1">
<p>Some content</p>
</div>
<div class="column2">
<ul>
<li>Some Items</li>
<li>Some Items</li>
</ul>
</div>
</div>