Here we are going to learn how to made css menu. No images, no javascript., no complexity Just a simple, cross browser compatible CSS list menu!
First of all we’ll need the HTML for our list menu, nothing but this is just a normal unordered list.
<div class="menu"> <ul> <li><a href="#">Home</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> </ul> <br style="clear:left"/> </div>
This is just a simple html coding with an unordered list menu on. I have added a div called menu around the list for manage overall menu.
Next we’re going to add the CSS code for the div called menu that surrounds the list.
.menu{
width: 100%;
background-color: #333; }
Here,. The menu div will be the full width of the and dark grey background.
Next we add the syling for the list and the list items.
.menu ul{
margin: 0; padding: 0;
float: left;}.menu ul li{
display: inline;}.menu ul li a{
float: left; text-decoration: none;
color: white;
padding: 10.5px 11px;
background-color: #333; }.menu ul li a:visited{
color: white;}.menu ul li a:hover, .menu ul li .current{
color: #fff;
background-color:#0b75b2;}
Its really simple, you should be able to understand the code with a little bit of CSS knowledge