Site-Navigation mit Listen, Beispiel 20b
Das Style-Sheet sieht so aus:
body { font-size: 15px; font-size: 12px; color: #000; background-color: #a76083; padding: 0; border-right: 5px solid #ffe; margin: 0; } P { margin: 0 1em; padding: 0.4em 0; } .code { font-size: 0.8em; background-color: #eee; color: #333; padding: 0.5em; margin: 0.5em; } .code pre { color: #333; background-color: #f8f8f8; padding: 0.5em; } .code pre em { color: #920; } #maincontent { background-color: #ffe; padding: 1em; border-right: 5px solid #a76083; border-left: 1px solid #672647; margin: 0 0 0 11.6em; } #navigation { background-color: transparent; position: absolute; top: 0.45em; left: 0.45em; } #navigation LI { background-color: transparent; padding: 0; margin: 0; list-style: none; width: 10.1em; } #navigation UL { background-color: transparent; padding: 0; margin: 0; } #navigation A { fontsize: 0.9em font-weight: bold; font-family: sans-serif; display:block; padding: 3px 0.63em; border: 1px solid #a76083; margin: 2px 0; } #navigation A:link, #navigation A:visited { color: #666; background-color: #e6e6e6; text-decoration: none; padding: 3px 0.63em; border: 1px solid #a76083; width: 9em; display: block; } #navigation A:hover, #navigation A:focus { color: #000; background-color: #fff; text-decoration: none; padding: 3px 0.63em; border: 1px solid #672647; width: 9em; 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>