Skip to Content

Adding a Sticky Nav Menu to your Website


Data shows that websites with a sticky nav menu are 22% faster to navigate...

Data shows that websites with a sticky nav menu are 22% faster to navigate by eliminating the need to scroll back to the top of the page. Several studies have shown that users prefer a website with a sticky nav to one without it 100% of the time without being told of the difference between websites. All data supports that your website should have a sticky nav so this article will show you how to do just that. Enjoy.

Below is the HTML, CSS, and JavaScript to add a sticky navigation menu to your website.

Step 1 - Add the HTML below to populate your website navigation

Step 2 - Add the CSS below to the main stylesheet of your website

Step 3 - Add the includes below to your website


Scott Madara
Contributions Editor here at Solodev. Want to be featured on the Solodev Blog? Get in touch.
Follow me on Twitter

Sign up to explore

Create an account in seconds and start building today.

Sign up for Solodev