Site-Navigation mit Listen, Beispiel 05
Das Style-Sheet sieht so aus:
body { padding: 0; margin: 0; } #maincontent { color: #000; background-color: #eee; padding: 1em; border-left: 1px dotted #ccc; margin: 0 0 0 200px; } #navigation { background-color: #b6e; position: absolute; top: 0; left: 0; } #navigation LI { background-color: #be6; padding: 0; margin: 0; list-style: none; width: 150px; } #navigation UL { background-color: #6be; padding: 0; margin: 0; } #navigation A { display:block; padding: 0; margin: 0; } #navigation A:link, #navigation A:visited { color: #fff; background-color: #eb6; text-decoration: none; display: block; } #navigation A:hover, #navigation A:focus { color: #fff; background-color: #fd6; text-decoration: none; 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="Browser-Support" href="#">Browser-Support</a></li> </ul> </div> <div id="maincontent"></div> </body> </html>