【发布时间】:2017-04-16 12:32:12
【问题描述】:
我想垂直居中对齐引导列中的按钮。
提琴手: https://jsfiddle.net/ebwwvy6m/23/
HTML
<div class="row">
<div class="col-sm-3 vcenter">
<button type="button" class="btn btn-success btn-sm" id="BtnExport">Export</button>
</div>
<div class="col-sm-9">
<div class="row">
<div class="col-sm-6">
Comment
<textarea rows="2" class="form-control" id="TextAreaComment"></textarea>
</div>
<div class="col-sm-6 vcenter">
<button type="button" class="btn btn-primary btn-sm" id="BtnEntry">Abandon</button>
</div>
</div>
</div>
</div>
CSS:
.vcenter {
display:inline-block !important;
vertical-align:middle !important;
}
预期:
我尝试了什么?
我尝试按照此处提供的解决方案,
- Vertical align button in the middle of the column- bootstrap
- Vertical align button middle next to text
- Bootstrap - Vertically Align Button With Well
但是,我没有得到解决方案。任何建议将不胜感激。谢谢。
【问题讨论】:
标签: html css twitter-bootstrap