Hii i need to fix table header but always th
go to top of window not top of table
I have test with position:relative but not work, i have add div with relative and sub div with absolute but not working 100%
My code.js
$('.fix').affix({
offset: {
top: 100
}
});
Css
.fix.affix {
position: fixed;
top: 40px;
left:0;
right:0;
width: 100%;
}
Html
<table style="width:50%; position:relative">
<tr class="fix">
<th width="33%">A</th>
<th width="33%">B</th>
<th width="33%">C</th>
</tr>
<tr>
<td>A</td>
<td>A</td>
<td>A</td>
</tr>
</table>
U have a idea plz ? Thanks