I am attempting to create a layout that features a type column on the left that takes up more width compared to the other two items on the right. This is because the type and description may be lengthy. Additionally, I want the type and description of each item to line up vertically with the quantity select menu and the subtotal content.
I am a beginner user of Bootstrap and I am using the table component to achieve this layout. I am unsure if using the table component is the correct approach or if I should consider using a panel or another method.
The current layout I have achieved can be viewed here: https://jsfiddle.net/bcvm3ap2/. However, the table titles are not aligned with the content and the content of each row is not vertically aligned.
Can you provide guidance on how to fix this issue? And also, if using a table is the correct approach for this layout?
HTML:
<div class="row no-gutters bg-white">
<div class="col-12 col-md-8 px-4 pb-4">
<table class="table table-responsive-sm border">
<thead>
<tr class="d-flex justify-content-between">
<th scope="col" class="mr-auto">Type</th>
<th scope="col">Quantity</th>
<th scope="col">Subtotal</th>
</tr>
</thead>
<tbody>
<tr>
<td class="">
<span class="text-heading-blue font-weight-semi-bold">Type1</span>
<small class="font-weight-light d-block">Description</small>
</td>
<td><select class="form-control font-weight-normal text-gray" id="exampleFormControlSelect1">
<option selected class="selected">0</option>
<option>1</option>
<option>2</option>
</select>
</td>
<td>0</td>
</tr>
<tr>
<td class="">
<span class="text-heading-blue font-weight-semi-bold">Type2</span>
<small class="font-weight-light d-block">Description</small>
</td>
<td><select class="form-control font-weight-normal text-gray" id="exampleFormControlSelect1">
<option selected class="selected">2</option>
<option>1</option>
<option>2</option>
</select>
</td>
<td>2</td>
</tr>
</tbody>
</table>
</div>
</div>
Using panels is also not achieving the intended layout: https://jsfiddle.net/jdpr21qw/1/. The titles are misaligned with the content.