Table Spaltengröße
ImBootstrap 3
, Ich könnte mich bewerbencol-sm-xx
zumth
Tags imthead
und ändern Sie die Größe der Tabellenspalten nach Belieben. Dies funktioniert jedoch in Bootstrap 4 nicht. Wie kann ich in Bootstrap 4 so etwas erreichen?
<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>
Betrachten Sie die Codeply-Datei, sofern ihre Größe nicht korrekt ist, insbesondere, wenn Sie der Tabelle einige Daten hinzufügen. Sehen Sie, wie das läuft:
<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>