Friday, 7 November 2014

Creating Horizontal menu using HTML and CSS.

style.css

#menubar{
 width:680px;
 height:40px;
 background-color:#333;
}
#menubar ul{
 list-style-type:none;
 padding-left:0;
}
#menubar ul li{
 display:inline;
}
#menubar ul li a{
 width:136px;
 color:#FFF;
 text-decoration:none;
 float:left;
 text-align:center;
 line-height:40px;
}
#menubar ul li a:hover{
 color:#39F;
 background-color:#000;
}

css_menu.html
<html>
<head></head>
<body>
<div id="menubar">
    <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">About</a></li>
    <li><a href="#">Projects</a></li>
    <li><a href="#">Features</a></li>
    <li><a href="#">Contact</a></li>
    </ul>
</div>
</body>
</html>

for more http://www.makeitsimple.co.in/CSS_menu1.php

No comments:

Post a Comment