这是一个很常见的问题。看看这篇文章......它有所有的答案:
http://matthewjamestaylor.com/blog/equal-height-columns-cross-browser-css-no-hacks
现在,这里有一个快速使用它的方法。尝试单击任何“列#”文本元素以将它们从文档中删除...列将很好地调整大小:)
http://jsfiddle.net/UnsungHero97/qUT3d/9/
HTML
<div id="container3">
<div id="container2">
<div id="container1">
<div id="col1">Column 1</div>
<div id="col2">Column 2</div>
<div id="col3">Column 3</div>
</div>
</div>
</div>
CSS
#container3 {
float:left;
width:100%;
background:green;
overflow:hidden;
position:relative;
}
#container2 {
float:left;
width:100%;
background:yellow;
position:relative;
right:30%;
}
#container1 {
float:left;
width:100%;
background:red;
position:relative;
right:40%;
}
#col1 {
float:left;
width:26%;
position:relative;
left:72%;
overflow:hidden;
}
#col2 {
float:left;
width:36%;
position:relative;
left:76%;
overflow:hidden;
}
#col3 {
float:left;
width:26%;
position:relative;
left:80%;
overflow:hidden;
}