Hello readers, Today in this blog you'll learn how to create a Responsive Navigation Menu using only HTML & CSS. Earlier I've shared a blog on how to create a Responsive Chatbox Widget. In this blog, I'm going to create a Responsive Navbar that is based on pure CSS.
You may have seen the Navigation Bar on many websites. Generally, A navigation bar is a user interface (UI) element within a webpage that includes links to other sections of the website. The navigation bar is the essential UI element of a website's design.
In this program (Responsive Navigation Menu Bar Design), there is a navbar on the top of the webpage and in this navbar, there is a logo on the left side and some navigation links on the right side of the navbar. On the PC, these navigation links are aligned in a horizontal line but on mobile devices, these links are aligned vertically. This is a pure CSS program and I didn't use JavaScript or any JavaScript library to create this Navigation Bar.
I used CSS @media property to make this navbar responsive for any devices - mobile, tab, and pc. You can watch a full video tutorial on this program (Responsive Navbar Design).
Video Tutorial of Responsive Navigation Menu Bar Design
In the video, you have seen the Responsive Navbar and I hope you have understood the basic codes behind creating this Navbar. As you have seen, on the mobile devices these navigation links are aligned vertically and there is also shown a menu button that toggles the Navbar to hide or show. To make this icon as a toggle button, I used HTML <input type="checkbox'> and control this checkbox with label tag.
You might like this:
Responsive Navigation Menu Bar [Source Codes]
To create this program (Responsive Navigation Menu Bar or Navbar). First, you need to create two Files one HTML File and another one is CSS File. After creating these files just paste the following codes in your file. You can also download the source code files through the given link. Click here to download source code files.
CSS FILE:

nice bro
ReplyDeleteThank you bro...Keep visiting!
Deletebro its not working properly it can shows search option in both desktop and mobile view.Also there is not navbar in mobile view
ReplyDeleteThere is no search box in this navbar you may did some mistakes...please download the code files from the above link.
Deleteamazing bro...
ReplyDeleteThank you bro :)
Deletehey bro what about copyright can i use everything i see in this tutorial?
ReplyDeleteYou are free to use them in your personal and commercial projects as long as you don't claim them as your own.
DeleteOn my website, whenever I scale it to the Iphone x size, there is a small space between the navbar and the menu. How do I fix this?
ReplyDeleteLet's me see...contact me on Instagram.
DeleteThank you bro, I love you xD
ReplyDeleteYou're welcome bro...Keep visiting!
Deletethank you so much sir
ReplyDeleteYou're welcome...Keep visiting!
Deletebro can i use the code in my blog
ReplyDeleteYes you can
Deletebro you said no js but script src="https://kit.fontawesome.com/a076d05399.js"></script
ReplyDeleteif i didn't connect to the internet the nav bar is not showing
This script is the FontAwesome CDN link for icons and it's an online CDN link so you must have to connected with the Internet to show or use icons. Otherwise, you can also download offline file to use as offline. And yes JavaScript is not used to make this Navigation Bar.
DeleteNice work bro. I copied the codes and made two changes only:
ReplyDelete1. Instead of "Brand" i wrote my work name
2. Changed the names of the list items
But, when i shrink the browser window, I do not get the menu button (which shows up as the 3 lines in the top right corner). I am using Google Chrome to view this. Any idea what can be wrong?
hello
ReplyDeleteWhen I squeeze the chrome window, the menu lines (3 lines i the top right corner) do not appear. Any ideas why?
ReplyDeleteMake sure you're connected to the Internet.
DeleteAmazing good job!! I hope you will tutorial to build a complete website using html css and js. Love from Vietnam
ReplyDeleteHere I have already made it - https://www.codingnepalweb.com/2020/09/responsive-personal-portfolio-website.html
DeleteThank you sir for this helpful code
ReplyDeleteI have converted this code to angular
ReplyDeletebut its not comming as same
Good Day
ReplyDeleteAm Muhsin a ICT student
i just copied your code up here about and i try to run it but it is not working i have try try but i could not find the problem
am learning Navigation Using HTML CSS and JS
if you could help it is going to be helpful to me
here is my Gmail Muhsinmusa240@gmail.com
Post a Comment
We welcome relevant and respectful comments. Off-topic or spam comments may be removed.