Hallo!
Ich hab ein kleines Problem mit einem Menü.
Dem Menü hab ich im aktiven Zustand die Klasse "navigation_active" zugewiesen. Hier mal mein TS
## Menu [oben, horizontal]
lib.mainMenu = HMENU
lib.mainMenu.entryLevel = 0
lib.mainMenu.1 = TMENU
lib.mainMenu.1.NO {
allWrap = |
ACT = 1
ACT.allWrap =<b> | </b>
}
## Menu [links, vertikal]
lib.subMenu = HMENU
lib.subMenu.entryLevel = 1
lib.subMenu.1 = TMENU
lib.subMenu.1.NO {
allWrap = | <br>
}
lib.subMenu.1.ACT = 1
lib.subMenu.1.ACT {
allWrap = | <br>
ATagParams = class="navigation_active"
}
## Menu [End]
So, das ganze klappt soweit auch, also die Klasse "navigation_active" wird angesprochen, allerdings wird die Farbe dieser Klasse nicht übernommen. Die bleibt bei "f39e43" sollte aber "00FF00" sein.
Das Menü um das es geht ist das linke (Klasse: navigation). Hier das CSS:
body {
background-color: #FEF8ED;
font-family: Arial;
}
table, p { margin:0; padding:0; }
.navigation {
font-family: Arial, Helvetica, sans-serif;
color: #f39e43;
font-size: 12px;
font-weight: bold;
text-decoration: none;
}
.navigation a:link {
color: #f39e43;
text-decoration: none;
}
.navigation a:visited {
color: #f39e43;
text-decoration: none;
}
.navigation a:hover {
color: fb7305;
text-decoration: none;
}
.navigation a:active {
color: fb7305;
text-decoration: none;
}
.navigation_top {
font-family: Arial, Helvetica, sans-serif;
color: #fb7305;
font-size: 12px;
font-weight: bold;
text-decoration: none;
}
.navigation_top a:link {
color: #fb7305;
text-decoration: none;
}
.navigation_top a:visited {
color: #fb7305;
text-decoration: none;
}
.navigation_top a:hover {
color: fb7305;
text-decoration: none;
}
.navigation_top a:active {
color: #fb7305;
text-decoration: none;
}
.content {
font-family: Arial, Helvetica, sans-serif;
color: #fb7305;
font-weight: normal;
font-size: 12px;
padding: 7;
text-decoration: none;
}
.content a:link {
color: #fb7305;
text-decoration: none;
}
.content a:visited {
color: #fb7305;
text-decoration: none;
}
.content a:hover {
color: fb7305;
text-decoration: none;
}
.content a:active {
color: #F57C2A;
text-decoration: none;
}
.navigation_active {
font-family: Arial, Helvetica, sans-serif;
color: #00FF00;
font-size: 22px;
font-weight: bold;
text-decoration: none;
}
Ist sicherlich nur eine Kleinigkeit aber ich seh den Fehler gerade nicht... 🙁
Falsch ist schonmal in deinem TS, dass sich dein ACT-Zustand in deinem NO-Zustand befindet:
lib.mainMenu.1 = TMENU
lib.mainMenu.1.NO {
allWrap = |
ACT = 1
ACT.allWrap =<b> | </b>
}
Dann gibts hier nen Fehler: (bei Color fehlt die #)
.navigation a:hover {
color: fb7305;
und hier: (bei Color fehlt die #)
.navigation a:active {
color: fb7305;
sowie hier: (bei Color fehlt die #)
.navigation_top a:hover {
color: fb7305;
und hier auch: (padding fehlt Einheit)
.content {
font-family: Arial, Helvetica, sans-serif;
color: #fb7305;
font-weight: normal;
font-size: 12px;
padding: 7;
SLAng schrieb
Falsch ist schonmal in deinem TS, dass sich dein ACT-Zustand in deinem NO-Zustand befindet:
lib.mainMenu.1 = TMENU
lib.mainMenu.1.NO {
allWrap = |
ACT = 1
ACT.allWrap =<b> | </b>
}
Danke für Deine Hilfe!
Mann, wie konnte ich das "#" nur vergessen #angry#
Ok - das ist nun korrigiert.
Trotzdem scheint es nicht zu funktionieren.
Wie ist das mit dem Menü - bei mir gehts um das linke Menü, also dieser Code hier, der sollte aber soweit passen, oder?
## Menu [links, vertikal]
lib.subMenu = HMENU
lib.subMenu.entryLevel = 1
lib.subMenu.1 = TMENU
lib.subMenu.1.NO {
allWrap = | <br>
}
lib.subMenu.1.ACT = 1
lib.subMenu.1.ACT {
allWrap = | <br>
ATagParams = class="navigation_active"
}
## Menu [End]
Leider wird meine Schriftfarbe bei einem aktiven Link noch immer nicht auf #00FF00 geändert. 😢
So, nun bin ich der Sache in wenig näher gekommen.
Die Farbe wird von der Klasse "navigation" überschrieben.
Konkret gehts um genau diesen Eintrag im CSS:
.navigation a:link {
color: #f39e43;
text-decoration: none;
}
Wenn ich diesen weglasse sieht mein aktiver, angeklicker Link exakt so aus wie ich es zugewiesen habe, also so:
.navigation_active {
font-family: Arial, Helvetica, sans-serif;
color: #00FF00;
font-size: 12px;
font-weight: bold;
text-decoration: none;
}
Nur dann habe ich das Problem, dass alle anderen Links nicht formatiert sind wenn ich die Klasse ".navigation a:link {" einfach weg lasse.
Es sollte so sein, dass diese -wenn der Link aktiv ist- komplett überschrieben wird. #paralyzed#
Weiss niemand weiter?
Ist schon ne Weile her, aber vieleicht brauchste ja immer noch ne Lösung.
Probiers mal mit Pseudo Klasen für navigation _active:
a.navigation_active:link {
font-family: Arial, Helvetica, sans-serif;
color: #00FF00;
font-size: 22px;
font-weight: bold;
text-decoration: none;
}
a.navigation_active:visited...
usw.
jubelmann schrieb
Ist schon ne Weile her, aber vieleicht brauchste ja immer noch ne Lösung.
Ja, das Problem ist noch immer nicht gelöst.
Mit Pseudo Klassen hatte ich es auch schon probiert - hat nix gebracht.
Es liegt nur immer an dem Farbproblem, der Rest würde ja funktionieren, nur eben die Farbe nicht wenn der Link aktiv ist.
Update:
Ich hatte bei meinen vorherigen Versuchen
.navigation_active:link
verwendet anstatt
a.navigation_active:link
Das wars! Danke @jubelmann!