【发布时间】:2015-06-29 19:04:24
【问题描述】:
使按钮保持在其列的底部
我正在使用 Bootstrap 3,我有一个 .row,其中有 2 列。在两列中都有内容,后跟一个按钮。使用tabletable-cell 方法,2 列匹配高度,现在我只是希望按钮保持在内容较少的行底部。我正在尝试使用垂直对齐来做到这一点,但它不起作用。 我错过了什么?
jsFiddle: http://jsfiddle.net/CSS_Apprentice/8z3twkb1/
HTML:
<div class="row">
<div class="col-xs-6">
<img src="http://placehold.it/50x50" alt="icon" />
<h5>Header</h5>
<p>Yet remarkably appearance get him his projection. Diverted endeavor bed peculiar men the not desirous. Acuteness abilities ask can offending furnished fulfilled.</p>
<button>Donate</button>
</div>
<div class="col-xs-6">
<img src="http://placehold.it/50x50" alt="icon" />
<h5>Header</h5>
<p>Yet remarkably appearance get him his projection.</p>
<button>Donate</button>
</div>
</div>
CSS:
.row {
display:table
}
.row > div {
display: table-cell;
float: none;
}
.row > div button {
vertical-align: bottom;
}
【问题讨论】:
标签: html css twitter-bootstrap