Responsive Navigation Menu Bar Design using only HTML & CSS

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.

If you like this program (Responsive Navigation Menu Bar or Navbar) and want to get source codes. You can easily get the source codes of this program. To get the source codes you just need to scroll down. You can use this navbar in your HTML pages, websites, and projects.

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.

HTML FILE:

CSS FILE:


Thanks for visiting, Keep visiting.


29 Comments

We welcome relevant and respectful comments. Off-topic or spam comments may be removed.

  1. bro its not working properly it can shows search option in both desktop and mobile view.Also there is not navbar in mobile view

    ReplyDelete
    Replies
    1. There is no search box in this navbar you may did some mistakes...please download the code files from the above link.

      Delete
  2. hey bro what about copyright can i use everything i see in this tutorial?

    ReplyDelete
    Replies
    1. You are free to use them in your personal and commercial projects as long as you don't claim them as your own.

      Delete
  3. On 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?

    ReplyDelete
  4. bro can i use the code in my blog

    ReplyDelete
  5. bro you said no js but script src="https://kit.fontawesome.com/a076d05399.js"></script

    if i didn't connect to the internet the nav bar is not showing

    ReplyDelete
    Replies
    1. 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.

      Delete
  6. Nice work bro. I copied the codes and made two changes only:

    1. 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?

    ReplyDelete
  7. When I squeeze the chrome window, the menu lines (3 lines i the top right corner) do not appear. Any ideas why?

    ReplyDelete
  8. Amazing good job!! I hope you will tutorial to build a complete website using html css and js. Love from Vietnam

    ReplyDelete
  9. I have converted this code to angular

    but its not comming as same

    ReplyDelete
  10. Good Day
    Am 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

    ReplyDelete

Post a Comment

We welcome relevant and respectful comments. Off-topic or spam comments may be removed.

Previous Post Next Post
CodingNepal
Subscribe our YouTube Channel