我非常渴望不使用表格(不是表格可以工作),但我们有一种情况,用户需要3列div浮动,一个div有两个div,其中一个这需要显示在div的底部。具有一列包含底部Div的CSS相同高度列
也许我需要重新思考整个过程并说服用户保持简单。
反正这里是我的代码:
<style>
#outer-div {
overflow: hidden;
background-color: grey;
}
#column-one {
padding-bottom: 500em;
margin-bottom: -500em;
background-color: red;
width: 200px;
float: left;
}
#column-two {
padding-bottom: 500em;
margin-bottom: -500em;
background-color: green;
width: 200px;
float: left;
}
#column-three {
padding-bottom: 500em;
margin-bottom: -500em;
background-color: blue;
width: 200px;
float: left;
}
#column-one-bottom {
position: absolute;
bottom: 0;
background-color: pink;
}
</style>
<div id="outer-div">
<div id="column-one">
<div id="column-one-top">
Column One Top Data<br/>
Column One Top Data<br/>
Column One Top Data<br/>
Column One Top Data<br/>
Column One Top Data<br/>
</div>
<div id="column-one-bottom">
Column One Bottom Data
</div>
</div>
<div id="column-two">
Column Two Data<br/>
Column Two Data<br/>
Column Two Data<br/>
Column Two Data<br/>
Column Two Data<br/>
Column Two Data<br/>
Column Two Data<br/>
Column Two Data<br/>
Column Two Data<br/>
Column Two Data<br/>
</div>
<div id="column-three">
Column Three Data<br/>
Column Three Data<br/>
Column Three Data<br/>
Column Three Data<br/>
</div>
<br style="clear: both;"/>
</div>
希望有人可以提供帮助。
问题出在#column-one-bottom。我需要这是它的父母的底部,而不是div的中间。
ummm可以提供截图吗? – 2012-07-18 12:51:09
我如何提供截图? – Rob 2012-07-18 12:53:33
http://jsfiddle.net/Zre8D/2/ – Rob 2012-07-18 12:59:25