Navigation Bar
CSS Designing
Horizontal Navigation Bar Designing
Hello friends,
Navigation Bar in any webpage is very important. Navigation Bar is the only things which is used by the visitors on your website to visit the webpages. So, The navigation bar should be appealing & stylish. In this blog, I am presenting you with a basic starting layout of navigation with which you can play & make it more stylish & elegant.
Here is the HTML Code:
<!DOCTYPE html>
<html>
<head>
<title>NAV Styling Demo</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="header"><h1>My First Web Page</h1></div>
<div class="nav">
<ul class="navmain">
<li class="navmenu"><a href="#">Home</a></li>
<li class="navmenu"><a href="#">About</a></li>
<li class="navmenu"><a href="#">Contact</a></li>
</ul>
</div>
</body>
</html>
<html>
<head>
<title>NAV Styling Demo</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="header"><h1>My First Web Page</h1></div>
<div class="nav">
<ul class="navmain">
<li class="navmenu"><a href="#">Home</a></li>
<li class="navmenu"><a href="#">About</a></li>
<li class="navmenu"><a href="#">Contact</a></li>
</ul>
</div>
</body>
</html>
& CSS code is here:
.header{
width:50%;
margin:auto;
text-align:center;
}
.navmenu{
float: left;
}
.navmain{
height:50px;
background-color: grey;
list-style-type: none;
margin:0;
padding:0;
}
.navmenu a{
text-decoration: none;
display:block;
color:black;
padding: 14px 16px;
}
.navmenu a:hover{
background-color: black;
color:white;
}
The Web Page will look like :
width:50%;
margin:auto;
text-align:center;
}
.navmenu{
float: left;
}
.navmain{
height:50px;
background-color: grey;
list-style-type: none;
margin:0;
padding:0;
}
.navmenu a{
text-decoration: none;
display:block;
color:black;
padding: 14px 16px;
}
.navmenu a:hover{
background-color: black;
color:white;
}
The Web Page will look like :
Here is the step -by -step video tutorial detailing every step in creating the above navigation bar.
Code for the above Navigation Bar
Use the code & make it more creative & stylish...
Dont forget to comment a snapshot of your navigation bar
Use the code & make it more creative & stylish...
Dont forget to comment a snapshot of your navigation bar
Comments
Post a Comment