0
我正在处理显示用户个人信息的网页,并且我想使用Bootstrap垂直对齐以红色显示的跨度。使用Bootstrap对齐跨度
以下是我的表格截图:
,这里是我使用的HTML/CSS代码:
HTML
<table class="table">
<tbody>
<div class="col-sm-6 test">
<span class=""><strong >First Name: </strong></span>
<span class="" style="color:red" >FirstName</span>
</div>
<div class="col-sm-6 test">
<strong class="">Age: </strong>
<span class="" style="color:red">Age</span>
</div>
<div class="col-sm-6 test">
<strong class="">Last Name: </strong>
<span class="" style="color:red">LastName</span>
</div>
<div class="col-sm-6 test" >
<strong class="">Status: </strong>
<span class="" style="color:red">Status</span>
</div>
</tbody>
</table>
CSS
.test{
border-top: 1px solid #e2eae9; vertical-align: middle; padding: 6px 8px;
}
您可以指定COL-XX-NN类横跨过,我相信,有效对齐它们。 – dmaij
他们看起来像是垂直对齐 – ZimSystem