Horizontal navigation bar with anchor and list
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Nav Bar Example</title>
<style rel="stylesheet" type="text/css">
body {
background-color: #ffffff;
}
a:link,a:visited {
text-decoration: none;
font-size: 12px;
font-weight: bold;
color: #000000;
}
#topNav {
width: 800px;
position: relative;
top: 10px;
left: 10px;
background: red;
height: 32px;
color: #cccccc;
padding: 0px;
margin: 0px;
}
#linkContainer {
position: absolute;
top: 10px;
left: 10px;
height: 16px;
padding: 0px;
margin: 0px;
z-index: 1;
}
a.topNavLink {
padding: 0px 5px 0px 5px;
border-right: 1px solid #666666;
}
a#lastItem {
border-right: none;
}
a.topNavLink:hover {
background: gold;
}
</style>
</head>
<body>
<div id="topNav">
<div id="linkContainer">
<a href="#" class="topNavLink">Home</a>
<a href="#" class="topNavLink">Products</a>
<a href="#" class="topNavLink">Services</a>
<a href="#" class="topNavLink">About Us</a>
<a href="#" id="lastItem" class="topNavLink">Contact Us</a>
</div>
</div>
</body>
</html>
Related examples in the same category