Struggling to implement the solution provided in this popular topic on Stack Overflow about creating an HTML table with a fixed left column and scrollable body. The issue arises from my use of the thead
and tbody
tags, which are not addressed in the examples.
The table structure includes days of the month in the thead
section and names of employees in the tbody
.
<table>
<thead>
<tr>
<th></th>
<th>01 July</th>
<th>02 July</th>
</tr>
</thead>
<tbody>
<tr>
<td>Employee 1</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Employee 2</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
The goal is to fix the td
cells containing employee names while enabling horizontal scrolling.