My issue lies in using bootstrap, HTML, and CSS. As I scroll, the table header does not move along with the data. I've attempted implementing sticky-top and position-relative without any success.
<div class="tab-div"><table class="table table-bordered table-hover table-sm table-responsive{-sm|-md|-lg|-xl}">
<thead class="table-head sticky-top">
<tr class="tr-tab">
<td class="text-align-center text-header" >Employee Number</td>
<td class="text-align-center text-header">Employee Name</td>
<td class="text-align-center text-header">Designation</td>
<td class="text-align-center text-header">Department</td>
</tr>
</thead>
<tbody>
<tr>
<td><input type="input" name="empNo" readonly class="form-control-plaintext col-md-1 value="test"/></td>
<td><input type="input" name="empName" value="test"/></td>
<td><input type="input" name="empDesig" value="test"/></td>
<td><input type="input" name="empDept" value="test"/></td>
</tr>
<!-- Duplicate Rows Below for Testing Purposes -->
</tbody>
</table>
</div>
I've explored various tutorials but have yet to find a resolution for my specific problem. Perhaps there is an error in my approach. Can anyone offer guidance on resolving this issue? I've replicated a few rows above for testing purposes.