HC || Sticky Header - Javascript
https://help.instapage.com/hc/en-us/articles/217140498-Add-a-sticky-header-or-footer-to-your-page
https://gist.github.com/dan-donica/ab54792f7dfce10347a1a36fc92d3e91
<!-- Begin "Sticky Header" || Help center -->
<!-- Insert in Settings->Javascript->Footer -->
<!-- CS:20201028-12-1 -->
<script data-cfasync="false">
document.addEventListener('DOMContentLoaded', stickyHeader);
window.addEventListener( 'resize', stickyHeader );
function stickyHeader() {
var header = window.__page_generator ? document.querySelector('.section') : document.querySelector('.page-block');
var headerHeight = header.clientHeight;
header.classList.add("sticky-header");
document.querySelector('body').style.marginTop = headerHeight + 'px';
}
</script>
<!-- End "Sticky Header" || Help center -->