In Bootstrap 3
, I could apply col-sm-xx
to the th
tags in the thead
and resize table columns at will. However this doesn't work in bootstrap 4. How can I achieve something like this in bootstrap 4?
<thead>
<th class="col-sm-3">3 columns wide</th>
<th class="col-sm-5">5 columns wide</th>
<th class="col-sm-4">4 columns wide</th>
</thead>
Looking at the codeply provided it doesn't size properly, especially if you add some data to the table. See how this runs:
<div class="container" style="border: 1px solid black;">
<table class="table table-bordered">
<thead>
<tr class="row">
<th class="col-sm-3">3 columns wide</th>
<th class="col-sm-5">5 columns wide</th>
<th class="col-sm-4">4 columns wide</th>
</tr>
</thead>
<tbody>
<tr>
<td>123</td>
<td>456</td>
<td>789</td>
</tr>
</tbody>
</table>
</div>