as per https://sigmascripts.com/how-to-fix-header-on-scroll/
<div id="header" class="big_header"> <p>TalkersCode Sticky Header</p> </div>
<script>
$(window).scroll(function()
{
if ($(this).scrollTop() > 1)
{
$('#header').addClass("sticky_header");
}
else
{
$('#header').removeClass("sticky_header");
}
});
</script>
table thead,
table tfoot {
position: sticky;
}
table thead {
inset-block-start: 0; /* "top" */
}
table tfoot {
inset-block-end: 0; /* "bottom" */
}