|
|||
Haupt- und Unternavigation???
Hallo zusammen,
seit 48h versuche ich eine css-Navigation zu erstellen, bei der auf weitere Links verzweigt wird. Also eine Haupt- und eine Unternavigation. Mein Probleme dabei ist, dass - wenn ein Link in der Hauptnavigation aktiviert ist - dieser seine spezifische Markierung (a:active) verliert, sobald ich auf einen Unterlink klicke. Jetzt war ich ja schon so schlau (?) und habe die css-Anweisungen für die Links in eine div-id gesteckt, leider ohne Erfolg. Scheint nicht der richtige Weg zu sein. Hat jemand einen Tipp für mich? Was mache ich falsch? Hier kommt noch der Testcode: div#main_nav a:link { color: lime; text-decoration: none;} div#main_nav a:visited { color: red; text-decoration: none;} div#main_nav a:hover { color: Fuchsia;} div#main_nav a:active { color: black; text-decoration: underline;} div#sub_nav a:link { color: Aqua;} div#sub_nav a:visited { color: lime;} div#sub_nav a:hover { color: Fuchsia;} div#sub_nav a:active { color: Red;} Juergen |
Sponsored Links |
|
|||
Äh... ja, da steht so ein wenig verlorenes CSS - aber wen oder was willst Du damit ansprechen.
CSS ohne HTML ist nichts - bitte vollständige Dokumente posten (aufs notwendige reduziert - s. Anleitung ): http://xhtmlforum.de/viewtopic.php?t=1399 |
Sponsored Links |
|
|||
html-code
Ja, da hast Du natürlich recht, hier kommt der Test-code:
<html> <head> <title> Kein Titel</title> <link rel="stylesheet" href="link_test.css"> </head> <body> <div id="main_nav"> <ul>[*]Link1[*]Link2[*]Link3 [/list]</div> <div id="sub_nav"> <ul>[*]sub_Link1[*]sub_Link2[*]sub_Link3[/list]</div> </body> </html> Juergen |
|
|||
Lösung?
Habe hier im Forum doch noch eine Lösung entdeckt, super, die ist wohl von Ulle (Grüsse an Ulle und super Idee von Dir):
a, a:link, a.on, a.on:link { color:#990000; background-color:#009966; font-size: 0.7em; text-decoration: underline; } a:visited { color:#990000; background-color:#0099FF } a:focus, a:hover, a:active, a.on, a.on:link { color:#FF0000; background-color:#000000; text-decoration: none; } Das werde ich jetzt ausprobieren. Juergen |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Unternavigation, Styling der 1. Ebene beim Hover | Barodscheff | CSS | 3 | 10.07.2014 22:30 |
Automatische Unternavigation | DarkDecipio | CSS | 1 | 19.05.2011 14:38 |
IE 6 - Unternavigation erscheint nicht | cssman | CSS | 1 | 03.04.2009 17:48 |
Navigation mit Unternavigation | Vybsi | (X)HTML | 3 | 23.12.2007 11:49 |
Problem mit Haupt- und Unternavigation | andreak | CSS | 3 | 23.01.2005 14:56 |