Site-Navigation mit Listen, Beispiel 22a
Das Style-Sheet sieht so aus:
body { font-size: 15px; font-size: 15px; color: #000; background-color: #ffffff; padding: 0; border: none; margin: 0; } #navigation { background-color: transparent; padding-left:0.3em; border-bottom: 2px solid #ffe; height: 3.5em; } #navigation LI { background-color: transparent; padding: 0; margin: 0; list-style: none; display:inline; } #navigation UL { background-color: transparent; padding: 0; margin: 0; } #navigation A { font: normal 12px/25px sans-serif; color: #000; text-decoration: none; text-align: center; padding: 3px 0 0; margin: 25px 0 0 0px; width: 150px; height: 22px; display: block; float:left; } #navigation A:link, #navigation A:visited { background: url(//graphics/op7back1.jpg) bottom center no-repeat; } #navigation A:hover, #navigation A:focus { background: url(//graphics/op7back2.jpg) bottom center no-repeat; } #maincontent { background-color: #ffe; padding: 1em; border-top: 2px solid #672647; margin: 0; }
Das HTML der Seite sieht so aus:
<html> <head></head> <body> <div id="ia"><div id="navigation"> <ul> <li><a class="ca" title="Grundlagen" href="/examples/listnav-22a.html">Grundlagen</a></li> <li><a class="cb" title="Referenz" href="/examples/listnav-22b.html">Referenz</a></li> <li><a class="cc" title="Tutorials" href="/examples/listnav-22c.html">Tutorials</a></li> <li><a class="cd" title="Browsers" href="/examples/listnav-22d.html">Browsers</a></li> </ul> </div></div> <div id="maincontent"></div> </body> </html>