Hallo,
folgendes Problem: in einem TMENU soll der aktuelle Punkt mit einem Highlight versehen werden. Ich tausche per wrap die CSS-Klassen aus und möchte so eine andere Textfarbe und einen anderen Hintergrund erreichen. Der Hintergrund wird auch geändert, der Text leider nicht.
hier ein code-snippet:
# MAIN NAV
marks.NAV = HMENU
marks.NAV.entryLevel = 0
marks.NAV.1 = TMENU
marks.NAV.1 {
NO {
allWrap = <TD onMouseOver="this.bgColor='#B475B2'" onMouseOut="this.bgColor='#F1F1F1'" class="nav" align="center">|</TD><TD><IMG SRC="fileadmin/templates/design_template/images/blank.gif" width="5" height="1"></TD>
}
#MAIN NAV HIGHLIGHT
ACT < .NO
ACT = 1
ACT {
ATagParams = class="navOn"
allWrap = <TD bgcolor="#B475B2" align="center" class="navOn">|</TD><TD><IMG SRC="fileadmin/templates/design_template/images/blank.gif" width="5" height="1"></TD>
}
}
Die Textfarbe wird nicht weiß angezeigt (class=navOn), sondern weiterhin grau (class=nav). Schreibe ich direkt in den wrap noch etwas hinein, etwa so:
ACT {
ATagParams = class="navOn"
allWrap = <TD bgcolor="#B475B2" align="center" class="navOn">TEST-TEXT|</TD><TD><IMG SRC="fileadmin/templates/design_template/images/blank.gif" width="5" height="1"></TD>
so wird dieser Text wie gewünscht weiß dargestellt. Meine Menüpunkte allerdings nicht 🙁
Im Quelltext erscheint die Klassenzuweisung übrigens ganz nach Plan:
<TD bgcolor="#B475B2" align="center" class="navOn"><A HREF="index.php?id=4" onFocus="blurLink(this);" class="navOn">Fachinfos</A></TD>
Ich hatte es kurz schonmal soweit, dass es funktionierte. Es ging dann aber leider wieder "kaputt" und ich kann es nicht rekonstruieren..
Weiß jemand Rat?
Servus,
wie sieht denn dein CSS-Code aus?
Viele Grüße,
Oliver Moser
Hallo,
meine CSS-Classes sehen so aus:
.nav {
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#706F6F;
font-weight:bold;
text-decoration:none;
text-align:bottom;
}
.navOn {
font-family:Tahoma,Arial,Sans-Serif;
font-size:20px;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
padding:0px;
margin:0px;
text-align:bottom;
}
.navOn a {
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
padding:0px;
margin:0px;
text-align:bottom;
}
.navOn a:hover {
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
padding:0px;
margin:0px;
text-align:bottom;
}
.nav a:hover{
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
background-color:#B475B2;
padding:0px;
margin:0px;
text-align:bottom;
}
.nav a {
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#706F6F;
font-weight:bold;
text-decoration:none;
text-align:bottom;
}
Wie du siehst, habe ich ziemlich viel ausprobiert. Daran sollte es *eigentlich* nicht liegen.
Danke für Hilfe
Hi,
probier es doch mal bei den Links mit folgendem CSS-Aufbau:
a.nav:link {
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
background-color:#B475B2;
padding:0px;
margin:0px;
}
Klappt's?
Viele Grüße,
Oliver Moser
Hallo Oliver,
danke für den Tipp, leider klappt es damit auch nicht. *schulternzuck*
Das witzige ist, dass bei mouseover die Schrift ja wieder im gewünschten weiß angezeigt wird. Nur beim ACT funzt das ganze nicht.
Ich probiers weiter...
nein, keine frames oder sonstiger schnick-schnack.
Hi Vanessa,
also ich bin mir sicher, dass die CSS-Angaben falsch sind. Ich habe den TS-Code für die CSS-Angaben genauso und bei mir klappt das. Der Quelltext sieht auch gut aus.
Kann man sich die Seite irgendwo im Netz angucken?
Viele Grüße,
Olli
Hallo,
ich habe nochmal rumprobiert mit dem CSS-Code von dir und siehe da - es klappt jetzt!
a.nav {
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
padding:0px;
margin:0px;
}
a.nav:link {
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
padding:0px;
margin:0px;
}
.nav {
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#706F6F;
font-weight:bold;
text-decoration:none;
text-align:bottom;
}
.nav a {
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#706F6F;
font-weight:bold;
text-decoration:none;
padding:0px;
margin:0px;
}
.nav a:hover {
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
padding:0px;
margin:0px;
}
.navOn {
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
padding:0px;
margin:0px;
text-align:bottom;
}
.navOn a {
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
padding:0px;
margin:0px;
text-align:bottom;
}
a.navOn:link {
font-family:Tahoma,Arial,Sans-Serif;
font-size:9px;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
padding:0px;
margin:0px;
}
Das mit der wechselnden Hintergrundfarbe mache ich jetzt über JS:
<TD onMouseOver="this.bgColor='#B475B2'" onMouseOut="this.bgColor='#F1F1F1'" class="nav" align="center"><A HREF="index.php?id=7" onFocus="blurLink(this);">Diagnostik</A></TD>
Vielen Dank für die Hilfe!