Site-Navigation mit Listen, Beispiel 17
Das Style-Sheet sieht so aus:
body { font-size: 15px; color: #000; background-color: #579; padding: 0; margin: 0; } #maincontent { background-color: #fff6e5; padding: 1em; border-left: 2px solid #345; 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 sans-serif; text-decoration: none; display:block; padding: 3px 4px; border: 2px solid #668cb2; margin: 1px 0 0; width: 148px; border-radius:4px; -moz-border-radius:4px; } #navigation A:link, #navigation A:visited { color: #fff; background-color: #668cb2; padding: 3px 4px; border: 2px solid #668cb2; border-color: #c1d1e0 #415971 #415971 #c1d1e0; } #navigation A:hover, #navigation A:focus { color: #fff; background-color: #79b; padding: 4px 3px 2px 5px; border: 2px inset #668cb2; border-color: #415971 #c1d1e0 #c1d1e0 #415971; }
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>