Are sticky headers bad?
If the sticky header is poorly designed, such that it does not compress at all when scrolling begins or is just very tall by default, you may find you are causing your visitors to scroll even more than they would have done without it. That's obviously bad for user friendliness, in the same way as pop-up adverts.
Is Sticky header good?
When done appropriately, sticky headers allow users to quickly access the navigation, search, and utility-navigation elements without scrolling up to the top of the page. They increase the discoverability of the elements in the header and the chance that users will take advantage of them.
How do you stick a header in CSS?
Answer: Use CSS fixed positioning
You can easily create sticky or fixed header and footer using the CSS fixed positioning. Simply apply the CSS position property with the value fixed in combination with the top and bottom property to place the element on the top or bottom of the viewport accordingly.