table with fixed header and scrollable body code example
Example 1: table fixed header
.tableFixHead thead th { position: sticky; top: 0; }
Example 2: html table scrollable body fixed header
/*Simply*/ position:sticky; top: 0; /*your th elements*/