Hello friends how are you ?
In this blog we will discuss how to create a attractive and responsive navigation bar with the help of HTML and CSS. The most important thing on this post that this navigation bar is fully responsive. If you want to learn about basic html then you visit my website.
What is navigation bar ?
Navigation bar is a most important part of any website because with the help of navigation bar we can move one page to another page so we can design a responsive navigation bar using html and css. In navigation bar , we can add multiple page through the anchor tag.
If you are regular viewer of my website then you know that we will provide a very simple and very easy code who understandable for you. Earlier I uave shared on article on Responsive contact us page using html and css and now we create a navigation bar using html and css.
There are many navigation bar tampletes available in the internet but mostly the are paid or make with the help of bootstrap but this navigation bar fully free and without using bootstrap.
In my blog you also find a responsive registration form using HTML and css, responsive contact us page, responsive about us page, responsive login page and many more. This web page are free for use and code is very easy.
In case you're novice and a bit little of HTML and CSS then codes and concept of this responsive navigation menu bar will genuinely help you to understand HTML and CSS more. That is a very simple responsive navigation bar with few and smooth codes.
Responsive Navigation Bar Using Html and Css
Below I have provide a preview of navigation bar. You can see this navigation bar looking good . I have provided responsive navigation bar you can see in preview image . Below i have provided code of navigation menu bar which is designed by using the html and css. Just scroll and copy code and use it now.
You can also learn
index.html
<html><head> <title>Responsive Navbar</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="stylesheet" href="style.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
</head><body> <div class="nav"> <input type="checkbox" id="check"> <label for="check" class="bar"> <i class="fas solid fa-bars"></i> </label> <span>Logo</span>
<ul> <li><a href="">Home</a></li> <li><a href="">About</a></li> <li><a href="">Gallery</a></li> <li><a href="">Contact </a></li> <li><a href="">Login</a></li> </ul> </div>
</body>
</html>
style.css
*{ margin: 0; padding: 0; text-decoration :none; }body{ background-color: blanchedalmond; }.nav{ background-color: blueviolet; height:65px; }.nav ul{float:right;margin:15px;}span{font-size :35px;color:#fff; float:left;margin:12px;}.nav ul li{ display: inline; text-align: center; padding-left: 20px; font-size:25px; color:aliceblue; margin-left :5px; }a{ color:white;}a:hover{ background :white; color:black; padding :7px; border-radius :7px; }
#check{ display :none; }.bar{ font-size: 30px; color: white; float: right; display: none; margin:15px; }
@media (max-width: 952px){ .bar{ display: block; }.nav ul{ width: 100%; height: 100vh; background: black; position: fixed; left: -120%; margin:65px 0; transition :0.62s; }.nav ul li{ display: block; margin: 50px 0; } #check:checked ~ul{ left:0; }}
comment 0 comments
more_vert