我有3 div
s。如果其他div
高度調整,我如何使他們平等。我希望我所有的div
都能調整它的高度,即使它們的內容較少。就像在圖像中一樣,即使沒有數據的div
也必須與其他圖像相同,並在底部設置讀取更多。div集高度相等
HTML:
<div class="column-wrapper">
<div class="column-small border border-top">
<h3>Features</h3>
<ul>
<li>Code blocking</li>
<li>Code Wrapping</li>
<li>Code Killing</li>
<li>Code Sleeping</li>
</ul>
<span><a href="#">Read more</a></span>
</div>
<div class="column-small border border-top">
<h3>Modules</h3>
<ul>
<li>Barking Around The house</li>
<li>Loving the Cats</li>
<li>Floating The points</li>
<li>Coding The Sleepers</li>
</ul>
<span><a href="#">Read more</a></span>
</div>
<div class="column-small border border-top">
<h3>Idont knows</h3>
<span><a href="#">Read more</a></span>
</div>
</div>
CSS:
.column-wrapper {
padding-top: 20px;
text-align: center;
vertical-align: middle;
width: 100%;
}
.column-wrapper div {
display: inline-table;
margin: 2px;
}
.column-small {
padding: 10px;
width: 30%;
min-width: 250px;
height: auto;
}
.column-small span {
float: right;
}
.column-small ul {
margin-top: -10px;
width: 100%;
max-width: 240px;
}
.column-small ul li {
text-align: left;
}
.column-small li {
list-style: none;
padding: 5px;
text-indent: -30px;
word-wrap: break-word;
}
您已將列 - 小高度設置爲自動;所以它現在在瀏覽器上計算div的高度。 – 2013-02-15 09:23:14