Site-Navigation mit Listen, Beispiel 14

Das Style-Sheet sieht so aus:

body {
   font-size: 15px;
   color: #000;
   background-color: #eee;
   padding: 0;
   margin: 0;
   }

#maincontent {
   background-color: #f7f7f7;
   padding: 1em;
   border-left: 2px dotted #ccc;
   margin: 0 0 0 174px;
   }

#navigation {
   background-color: transparent;
   position: absolute;
   top: 7px;
   left: 7px;
   }

#navigation LI {
   background-color: transparent;
   padding: 0;
   margin: 0;
   list-style: none;
   width: 160px;
   }

#navigation UL {
   background-color: transparent;
   padding: 0;
   margin: 0;
   }

#navigation A {
   font: bold 1em/25px sans-serif;
   text-align: center;
   text-decoration: none;
   display: block;
   padding: 5px 10px;
   border: none;
   margin: 0;
   }

#navigation A:link, #navigation A:visited {
   color: #000;
   background: #eee url(../../graphics/navback4.gif)
               no-repeat
               0% 100%;
   padding: 1px 10px 9px;
   width: 140px;
   display: block;
   }

#navigation A:hover, #navigation A:focus {
   color: #000;
   background: #eee url(../../graphics/navback4.gif)
               no-repeat
               0% 0%;
   padding: 1px 10px 9px;
   width: 140px;
   display: block;
   }

Das HTML der Seite sieht so aus:

<html>
<head></head>
<body>

<div id="navigation">
<ul>
<li><a title="Grundlagen"
       href="#">Grundlagen</a></li>
<li><a title="Referenz"
       href="#">Referenz</a></li>
<li><a title="Tutorials"
       href="#">Tutorials</a></li>
<li><a title="Browsers"
       href="#">Browsers</a></li>
</ul>
</div>

<div id="maincontent"></div>
</body>
</html>