cssheadersticky

How to create sticky header bar for a website


I want to create a sticky header bar for a website just like the sticky header on this website (http://www.fizzysoftware.com/).


Solution

  • In your CSS, add

    position: fixed;
    

    to your header element. It's just that simple, really. And next time, try to use right click on something you see on website and choose "Inspect element". I think that every modern browser has it now. Very useful function.