Zum Inhalt springen

Aktiver Link hat falsche Farbe

Erstellt am 23. Februar 2007 · 2 Antworten · letzte Antwort am 23. Februar 2007

Tags: HTML & CSS, Frage

erschaup ·

Hallo

Ich habe ein horizontales Menu und dafür eine CSS-Klasse definiert. Ist der Link normal, besucht oder im hover-Zustand, dann sind die Farben in Ordnung. Ist er jedoch aktiv, dann sollte er auch orange sein, er erscheint jedoch weiterhin blau.
Wo habe ich denn nur einen Fehler gemacht. Suche schon die ganze Zeit und komme nicht drauf.

Hier mal mein CSS und mein Typoscript:

.menuk:link {
	font-size: 12px;
	font-weight: bold;
	color: #0000fe;
	text-decoration: none;
}

.menuk:visited {
	font-size: 12px;
	font-weight: bold;
	color: #0000fe;
	text-decoration: none;
}

.menuk:hover {
	font-size: 12px;
	font-weight: bold;
	color: #eb9041;
	text-decoration: none;
}

.menuk:active {
	font-size: 12px;
	font-weight: bold;
	color: #eb9041;
	text-decoration: none;
}

.menuk:focus {
	font-size: 12px;
	font-weight: bold;
	color: #eb9041;
	text-decoration: none;
}

Das Typoscript dazu:

MENU_OBEN = HMENU
MENU_OBEN.special = directory
MENU_OBEN.special.value = 4
MENU_OBEN.1 = TMENU
MENU_OBEN.1.NO.ATagParams = class="menuk"
MENU_OBEN.1{
	NO{
	linkWrap = |            
	Link=1
	}
}
MENU_OBEN.1.ACT.ATagParams = class="menuk"
MENU_OBEN.1.ACT = 1
MENU_OBEN.1{
	ACT{
	linkWrap = |            
	Link=1
	}
}

Hilfe wäre super!
Ed

einpraegsam.​net ·

Du vergibst in deinem TS für die aktiven und alle nicht aktiven Elemente die gleiche Klasse: menuk

Vergieb für ACT eine andere Klasse - z.B.

MENU_OBEN.1.NO.ATagParams = class="menu_no"
MENU_OBEN.1.ACT.ATagParams = class="menu_act"

Im CSS:

a.menu_act { color: red; }
a.menu_no { color: blue; }