I am a beginner in html and bootstrap, and I am trying to create a table. However, I noticed that the input fields are not aligning properly within the cells. Even when I tried adjusting the width to 100%, the % sign ended up on a separate row. Can anyone help me figure out what I am missing?
<div class="card">
<table class="table table-bordered table-condensed table-clean table-p-0 table-v-middle">
<thead>
<tr>
<th class="col-lg-3">Inventory Type</th>
<th class="col-lg-3">CTV (App)</th>
<th class="col-lg-3">App (Mobile)</th>
<th class="col-lg-3">Site (Desktop,Mobile))</th>
</tr>
</thead>
<tbody>
<tr>
<td>Open Market</td>
<td class="d-flex">
<!-- CTV -->
<span class="table-control-addon-right">%</span>
<input type="number" class="w-100" step="0.1" max="100">
</td>
<!-- App -->
<td class="d-flex">
<span class="table-control-addon-right">%</span>
<input type="number" class="w-100" step="0.1" max="100">
</td>
<!-- SITE -->
<td class="d-flex">
<span class="table-control-addon-right">%</span>
<input type="number" class="w-100" step="0.1" max="100">
</td>
</tr>
<tr>
<td>PMP</td>
<td class="d-flex">
<!-- CTV -->
<span class="table-control-addon-right">%</span>
<input type="number" class="w-100" step="0.1" max="100">
</td>
<!-- App -->
<td class="d-flex">
<span class="table-control-addon-right">%</span>
<input type="number" class="w-100" step="0.1" max="100">
</td>
<!-- SITE -->
<td class="d-flex">
<span class="table-control-addon-right">%</span>
<input type="number" class="w-100" step="0.1" max="100">
</td>
</tr>
</tbody>
</table>
</div>
If you're also struggling with aligning the input field and the % sign on the same row, check out this solution:
https://i.sstatic.net/4ZQUK.png
This particular method has helped solve the issue:
<td>Open Market</td>
<td class="d-flex flex-row-reverse">
<!-- CTV -->
<div class="d-flex" style="display: flex;"> <!-- need to add display flex -->
<input type="number" class="w-100" step="0.1" max="100" style="border:none;"> <!-- need to add boarder none -->
<span class="table-control-addon-right">%</span>
</div>
</td>