dropdown menu using css

Dropdown menu using css:

dropdown menu usign css

index.php:


<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Drop-down menu using css</title>
<link rel="stylesheet" href="san.css" type="text/css">
</head>

<body>

<ul id="sanmenu">
<li><a href="">Home</a></li>
<li><a href="">Profile</a>
<ul><li><a href="">about1</a></li>
<li><a href="">about2</a></li>
<li><a href="">about3</a></li>
<li><a href="">about4</a></li>
</ul>

</li>
<li><a href="">Products</a></li>
<li><a href="">Gallery</a></li>
<li><a href="">contacts</a></li>
<li><a href="">linkbuild</a></li>
</ul>
</body>
</html>

san.css

@charset "utf-8";


#sanmenu ul {
    list-style: none;
 position: absolute;
    display: none;
z-index: 999;
}

#sanmenu > li {
    float: left;
}
#sanmenu li a {
display: block;
    height: 3em;
    line-height:3em;
    padding: 0 1.4em;
    text-decoration: none;
}

#sanmenu ul li a {
    width: 80px;
}
#sanmenu li:hover ul {
    display: block;
}
#sanmenu {
    font-family: Arial;
    font-size: 14px;
    background:#993300;
width:1160px;
float: left;
list-style: none;
}
#sanmenu > li > a {
    color: #fff;
    font-weight: bold;
}
#sanmenu > li:hover > a {
    background: #f09d28;
    color: #000;
}

/* Submenu
------------------------------------------*/
#sanmenu ul {
    background: #f09d28;
}
#sanmenu ul li a {
    color: #000;
width:120px;
}
#sanmenu ul li:hover a {
    background: #ffc97c;
background:#FFFF00
}
/* CSS Document */


Post a Comment

0 Comments