My Green Navigation Bar |
The markup
<!Doctype html>
<html>
<head>
<title>My Green Navigation Bar</title>
<link rel ="stylesheet" href ="tell.css">
</head>
<body>
<div class ="tell">
<ul id = "navigation">
<li><a href="">Home</a>
<ul>
<li><a href="">Gold</a></li>
<li><a href="">Platinum</a></li>
</ul>
</li>
<li><a href="">Mail</a></li>
<li><a href="">Cars</a></li>
<li><a href="">Doll</a></li>
</ul>
</div>
</body>
</html>
<html>
<head>
<title>My Green Navigation Bar</title>
<link rel ="stylesheet" href ="tell.css">
</head>
<body>
<div class ="tell">
<ul id = "navigation">
<li><a href="">Home</a>
<ul>
<li><a href="">Gold</a></li>
<li><a href="">Platinum</a></li>
</ul>
</li>
<li><a href="">Mail</a></li>
<li><a href="">Cars</a></li>
<li><a href="">Doll</a></li>
</ul>
</div>
</body>
</html>
The Stylesheet
.tell{background-color: green;
height: 50px;
position: relative;
z-index: 99;
}
#navigation{
height: 50px;
position: absolute;
margin: 0;
padding: 0;
border-right: 1px solid #58bf21;
}
#navigation li{
background-color: #58bf21;
margin: 0;
float: left;
list-style: none;
width: 200px;
text-align: center;
}
#navigation a{
color: white;
font-family: Tahoma;
text-decoration: none;
border-left: 1px solid green;
padding: 18px 0;
display: block;
}
#navigation li:hover, a:hover{
background-color: green;
}
#navigation li ul{
display: none;
margin: 0;
padding: 0;
}
#navigation li:hover ul {
display: block;
}
#navigation li ul li a:hover{
background-color: green;
}