I would like to fix my tables head (thead
) as soon as someone scrolls down or fix the first column (.first-column
) as soon as someone scrolls left or right. Below you can see an example of my table. It can contain about 100 columns and 1000 cells, that is why I need this.
I guess this is not possible with just plain css, but maybe I am wrong. Way or another, I would like to ask for help to get this right. I am using jQuery 2.x
.
<table>
<thead>
<tr>
<td class="first-column"></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td> class="first-column"> </td>
<td></td>
<td></td>
<td></td>
</tr>
</thead>
<tbody>
<tr>
<td> class="first-column"> </td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td> class="first-column"> </td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td> class="first-column"> </td>
<td></td>
<td></td>
<td></td>
</tr>
...
</tbody>
</table>
asdfasdf