【发布时间】:2012-05-10 09:07:46
【问题描述】:
我有以下 html,但我对以下内容非常困惑:
-
.rowNumber和.title在所有三个框中的高度相同 -
.rowNumberItems在每列中的内容量不会相同
如何使用 CSS 使列相等,以便我的 .button div 在所有列中都相等?
我的专栏是height:200px; by width:195px;
示例列:
<div id="priceTable">
<div class="rowOne">
<p class="title">Name</p>
<ul class="rowOneItems">
<li>Custom Design</li>
</ul>
<div class="button"><a href="#">Buy Now</a></div>
</div> <!-- Column One -->
</div>
当前 CSS:
#priceTable{
width:780px;
height:230px;
margin:0 auto;
overflow:hidden;
background:gray;
}
.rowOne, .rowTwo, .rowThree{
float:left;
height:225px;
width:195px;
margin:0 40px 0 0;
background:red;
}
#priceTable .title{
font-weight:bold;
text-align:center;
color:#000;
}
#priceTable .button{
background:green;
background:url('../images/button.png') no-repeat;
}
【问题讨论】:
-
@BenjaminUdinktenCate 我已经放弃了我当前的 CSS
-
等等,你想让它做什么?
-
@MagicDev 我只希望 .button div 对齐且相等,而不依赖于项目 ul 中的内容