Jones Vinoth Joseph

Developer - .Net(C#|VB), HTML, CSS, jQuery

Fixed header (This is the default mode, keeps header row fixed)

Example on the right shows a demo of a single row fixed as header.
HTML
<table>
<thead>
  <tr>
   <th>...</th>
  </tr>
</thead>
<tbody>
  <tr>
   <td>...</td>
   <td>...</td>
  </tr>
</tbody>
<tfoot>
  <tr>
   <td>...</td>
  </tr>
</tfoot>
</table>
CSS
td.fth-header, th.fth-header,
td.fth-footer, th.fth-footer {
border-top: none !important;
border-bottom: 1px solid #ddd;
}
td.fth-header, th.fth-header {
background-color: #3D7083;
color: white;
}
td.fth-footer, th.fth-footer {
background-color: #4F90A8;
color
: white;
}
jQuery
$('#tableContainer').fixTableHeader();
Subject Sem1 Sem2 Total
Total 1243 1143 2386
Physics-1 67 78 145
Physics-2 76 56 132
Physics-3 56 67 123
Physics-4 92 34 126
Physics-5 76 35 111
Physics-6 43 65 108
Physics-7 43 65 108
Physics-8 43 65 108
Physics-9 43 65 108
Maths-1 64 47 111
Maths-2 98 79 177
Maths-3 78 67 145
Maths-4 67 54 121
Maths-5 86 98 184
Maths-6 79 54 133
Maths-7 79 54 133
Maths-8 79 54 133
Maths-9 79 54 133
Chemistry-1 65 62 127
Chemistry-2 67 86 153
Chemistry-3 59 46 105
Chemistry-4 58 85 143
Chemistry-5 74 34 108
Chemistry-6 38 96 134
Chemistry-7 38 96 134
Chemistry-8 38 96 134
Chemistry-9 38 96 134
Computer-1 38 96 134
Computer-2 38 96 134
Computer-3 38 96 134
Computer-4 38 96 134
Computer-5 38 96 134
Computer-6 38 96 134
Computer-7 38 96 134
Computer-8 38 96 134
Computer-9 38 96 134