Designing a responsive layout doesn’t need to be difficult. Especially if you initially wireframe to plan ahead and figure out exactly what you’re creating.
One of the hardest parts of a good responsive site is the navigation. This can take a while to figure out and there are plenty of tutorials to help with that.
But I’m also a fan of using code snippets like the ones I’ve collected for this article.
All of these responsive navigation snippets are free to edit and clone for your own projects. They also feature a variety of styles so there’s going to be something here that’ll work for all types of websites.
1. Responsive Fullpage Demo
There’s a lot to say about this fullpage demo created by Johnny Mango. It’s an example of just how far you can take a website’s prototyping phase.
You’ll notice the navigation has an interesting feature when you hover and auto-focus on links. This effect can be altered in a “live” website with the same nav, but it’s useful in this example to show off the page’s UI/UX.
Resize your browser window to see exactly how this navigation gets rearranged. You may be surprised at the final result.
You can even dig into the fullsize preview to get a better look at it.
2. Dropdown Navbar
If you need longer dropdown items in your navigation then this menu might work better.
It’s a strong alternative to the more basic navigations that only feature a handful of links. In this case you’ll find a simple list of links with a very small dropdown.
The sub-menu links only appear on a click event which is handled by jQuery. You could change that to CSS-only, but you’ll lose the click trigger.
Still, for such a clean design I’m surprised at how much versatility this snippet offers developers.
3. Single-Page Layout
Single page navigation menus need love just like the any other.
Thankfully this pen by Jan Czizikow got lots of love with a brilliant design.
This is a perfect example of single-page navigation in action. The links scroll down with a smooth animation but don’t leave you waiting for too long.
Not to mention they automatically resize to the perfect fit regardless of your browser size.
I mostly recommend this type of navigation for a sales page or a simple portfolio site. It’s really clean and features some great animation work alongside the responsive techniques.
4. Red Dropdown Menu
Developer Stéphanie Walter has made some really interesting projects for the web. This snippet is just one example featuring a bright red responsive navigation she built.
The links have a little more pizzazz with a custom selected feature and a nice hover effect to boot.
When resized you’ll notice the nav uses a sliding dropdown menu instead. I’d almost opt towards a block-level list of links for mobile, but this works much better considering the sub-menu.
If you’d like something with some spice on your page this snippet is worth copying & reworking to your liking.
5. Pure CSS3 Design
Now here’s a really unique design using pure CSS3 for the navigation.
It’s a vertical menu with nav links mimicking the periodic table of elements. The snippet was created by Ahmad Hjazy, and it’s a sight to behold.
The hover effects are a bit delayed yet undoubtedly interesting. Not to mention the responsive style is surprisingly usable.
Perhaps the most impressive part is how this entire thing runs solely on CSS3.
6. Responsive Sticky Header
I mentioned single page design in an earlier snippet and this responsive header follows a similar trajectory.
Only difference is that this navigation has a slightly larger block on the page and it handles responsive page design a little differently.
When you resize the browser you’ll notice this uses the hamburger icon with a fun animation. It’s nice considering the style but may not be everyone’s cup of tea.
Still an impressive navigation for single pages or landing pages that need a sleek navbar without all the frills.
7. Responsive & Touch-Friendly
All good websites should be touch enabled by default. That’s what makes this navigation even more appealing to designers.
It supports all screen styles and makes it so much easier for users to browse on their phones.
Each link does lead to a new page but you can tap to hover the dropdown menus with ease on any touch-based device. This is a feature often missing from navigation menus and it’s one reason dropdowns can be so tricky to design.
8. Simple Nav Links
When I think of really simple navigation menus I think of a design like this.
Each link appears as its own block element, even on smaller screens. There is no hamburger menu and no hidden animated menu feature. Instead the links just resize and break onto separate lines.
The trickiest part is handling the dropdown effect on mobile devices. Many of the links do have sub-menus, and they’ll work the same on smaller screens.
I’d argue this works best for sites with little-to-no submenus, but it’s worth a try on mobile just to see what you think of the experience.
9. PS Curtain Menu
Developer Louis Chenais created one of my favorite responsive navigations based on the PlayStation website.
Louis calls this a “curtain menu” where it slides into view overtaking the entire page. This is really common for mobile interfaces and it’s quickly become a hot choice for web designers too.
One thing I really like is the animation style. It’s sleek and fast enough to display the links without leaving users bored.
And best of all this feels like it could work on a production website.
Try clicking the search icon to check out that effect too. Both work flawlessly, and I’d call this a brilliant navigation for any corporate website.
10. Responsive Mega-Menu
You can search the web and find hundreds of mega navigation menus. These typically appear on larger blogs and news websites, but they’re also popular on ecommerce shops or even large agency sites.
The toughest part of a mega-menu is making it fully responsive.
Thanks to this small snippet you can rework the mega menu design to fit any screen with ease.
On mobile it uses a sliding navigation to display all the internal links in one menu. This may seem a tad annoying, but you could also use jQuery to hide the sub-links if that makes sense.
It’s still one of the best responsive solutions I’ve seen for running a mega menu on desktop without alienating mobile users.
- 15 Simple Responsive Navigation Solutions & Tutorials
- How to Create Responsive Off-Screen Menus with CSS3
- 10 Free Responsive Pricing Table HTML & CSS Snippets
- 10 CSS Code Snippets That Demonstrate Responsive Text Techniques
- 20 Free Responsive Navigation & Menu jQuery Plugins
- 20 Examples of Fullscreen Responsive Menus
- How to Create a Full Width Responsive Tiled Menu with CSS
- 8 Code Snippets to Make Your Pagination Pop