Simple Horizontal Menu




A simple, cross browser compatible horizontal CSS menu, no images or javascript.

Demo:

HTML code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="menu.css" />
<title>CSS Simple Horizontal Menu</title>
</head>
<body>
<div class="menu_simple">
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
<li><a href="#">Link 4</a></li>
<li><a href="#">Link 5</a></li>
</ul>
<br />
</div>
</body>
</html>
CSS code:
/* CSSTerm.com Simple CSS menu */

br { clear:left }

.menu_simple {
    width: 100%;
    background-color: #005555;
}

.menu_simple ul {
    margin: 0; padding: 0;
    float: left;
}

.menu_simple ul li {
    display: inline;
}

.menu_simple ul li a {
    float: left; text-decoration: none;
    color: white; 
    padding: 10.5px 11px;
    background-color:  #005555;
}
 
.menu_simple ul li a:visited {
    color: white;
}
 
.menu_simple ul li a:hover, .menu_simple ul li .current {
    color: white;
    background-color: #5FD367;
}