My code below
<div>Some Page Content </div>
<div style="max-height: 200px; overflow: auto;">
<table id="test">
<thead>
<tr>
<th>
</th>
</th>
</thead>
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
<div>Some Page Content </div>
Am trying to have vertical scroll bar
for Div so if it exceeds the max height am getting the scroll bar which is working fine.
Now i tried to fix the Header to be fixed
i tried position:Fixed for TH
and what it does is it keeps the header fixed all through the page. I saw few posts regarding the same on Fixed header and am confused of the best way of implementing these as most of them are old answers.
My Output should be like Div(Table) should be scrollable and the header to Fixed only for that table and not for the Entire page.
Hoping for a simple and better approach to achieve this
Thanks