【发布时间】:2017-03-07 18:38:29
【问题描述】:
我正在使用 Bootstrap,我想在同一列中“并排”对齐图像和表格。
HTML 代码:
<div class="col-md-10" style="width: 100%">
<img src="#" class="img-responsive pull-left pro-page-pro-image">
<div class="container">
<table class="table table-responsive pull-right pro-page-contact-details-table">
<tbody>
<!---the table has 12 rows in total -->
<tr>
<td>MEMBER SINCE</td>
<td>2007</td>
</tr>
<tr>
<td>Suburb</td>
<td>Fourways, Randburg</td>
</tr>
</tbody>
</table>
</div>
</div>
相关CSS:
.pro-page-pro-image {
display:inline;
margin-top: 4%;
margin-left: 11%;
margin-right: 11%;
margin-bottom: 4%;
}
.pro-page-contact-details-table {
display: inline;
}
.table 和 .table-responsive 类是标准引导类。目前在浏览器中,表格位于图像的正下方(均左对齐),尽管尝试了很多方法,但我无法让它们并排对齐。
任何指针将不胜感激。
【问题讨论】:
标签: html twitter-bootstrap css inline positioning