我有两个垂直堆叠在一起的表格。有两个分开的margin-bottom
。对齐两个垂直HTML表格
与目前的代码如下所示:
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<table class="....">
<thead>
<tr>
<th class="...."></th>
<th>
<a href="#list-table" class="....">
<span class="...">Batch Queue</span>
<span class="..."></span>
</a>
</th>
<th>
<a href="#list-table" class="...">
<span class="...">Start Date</span>
<span class="..."></span>
</a>
</th>
<th>
<a href="#list-table" class="...">
<span class="...">Status</span>
<span class="..."></span>
</a>
</th>
<th>
<a href="#list-table" class="...">
<span class="...">Est Time to Complete</span>
<span class="..."></span>
</a>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="batch in vm.batches | filter : {completion_status:'!'+'100'}">
<td ng-class="batch.completion_status === '100' ? 'table-status-ok' : (batch.completion_status > '60' ? 'table-status-warning' : 'table-status-error')"></td>
<td class="..."><a href="javascript:void(0);">{{batch.batch_queue_name}}</a>
</td>
<td class="...">{{batch.start_date}}</td>
<td class="...">
<div class="progress-bar">
</div>
</td>
<td class="...">{{batch.end_date}}</td </tr>
</tbody>
</table>
<table class="...">
<thead>
<tr>
<th class="..."></th>
<th>
<a href="#list-table" class="...">
<span class="...">Completed Batches</span>
<span class="..."></span>
</a>
</th>
<th>
<a href="#list-table" class="...">
<span class="...">Start Date</span>
<span class="..."></span>
</a>
</th>
<th>
<a href="#list-table" class="...">
<span class="...">Completed Date</span>
<span class="..."></span>
</a>
</th>
<th>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="batch in vm.batches | filter : {completion_status:'100'}">
<td class="table-status-ok"></td>
<td class="..."><a href="javascript:void(0);">{{batch.batch_queue_name}}</a>
</td>
<td class="...">{{batch.start_date}}</td>
<td class="...">{{batch.end_date}}</td>
<td></td>
</tr>
</tbody>
</table>
所以基本上所有表看起来像这样的UI:
可以看到两个独立的表堆叠在彼此的顶部。我想要的是下面的表格列与垂直内嵌列的顶部。
我试图包括一个空白<td></td>
但没有奏效。
将特定宽度添加到td或宽度:25%;对于4等分列 –
您需要明确指定列的宽度。否则,这些列将处于自动大小 –