Left navigation bar in CSS
Left navigation bar
The following CSS creates a Left navigation bar. It removes the list style
from ul
.
<!DOCTYPE HTML>
<html>
<head>
<style>
<!--from w ww .ja v a 2 s .com-->
#list {
width: 214px;
margin: 5px 0 0 0;
float: left
}
#list ul {
padding: 21px 0 30px 16px;
list-style-type: none
}
#list div {
padding: 21px 0 30px 16px;
font-size: 11px;
color: #595959;
}
#list div p {
width: 185px;
padding: 5px 0 5px 3px
}
#list li a {
font-size: 11px;
color: #595959;
text-decoration: underline;
line-height: 24px;
padding: 0 0 3px 22px;
}
#list a:visited {
text-decoration: underline
}
#list a:hover {
text-decoration: none
}
</style>
</head>
<body>
<div id="list">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About our Website</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Photogallery</a></li>
<li><a href="#">Testimonials</a></li>
<li><a href="#">Locations</a></li>
<li><a href="#">Contacts</a></li>
</ul>
</div>
</body>
</html>
The code above generates the following result.