I'm attempting to adjust the width of a specific table column in Bootstrap to fit its content width. I want the first column to take up as little space as possible. Check out the code snippet and jsfiddle link below to see what I've tried so far.
Any help would be greatly appreciated!
Expected outcome:
Some Heading
Some text some text Some text some text Some text some text Some text some text:
AAA: Some Text A
B: Some Text B
CCCCC: Some Text C
https://jsfiddle.net/ne45y0gm/
<h4>Some Heading</h4>
<p class="mb-1">Some text some text Some text some text Some text some text Some text some text:</p>
<table class="table table-sm table-borderless">
<tr class="row">
<td class="col-sm-auto">AAA:</td>
<td class="col">Some Text A</td>
</tr>
<tr class="row">
<td class="col-sm-auto">B:</td>
<td class="col">Some Text B</td>
</tr>
<tr class="row">
<td class="col-sm-auto">CCCCC:</td>
<td class="col">Some Text C</td>
</tr>
</table>
<hr>
<div class="row">
<div class="col-sm-auto">AAA:</div>
<div class="col">Some Text A</div>
</div>
<div class="row">
<div class="col-sm-auto">B:</div>
<div class="col">Some Text B</div>
</div>
<div class="row">
<div class="col-sm-auto">CCCCC:</div>
<div class="col">Some Text C</div>
</div>
<hr>
<div class="row">
<div class="col-sm-2">AAA:</div>
<div class="col-sm-10">Some Text A</div>
<div class="col-sm-2">B:</div>
<div class="col-sm-10">Some Text B</div>
<div class="col-sm-2">CCCCC:</div>
<div class="col-sm-10">Some Text C</div>
</div>