K kittlos Medlem sedan sep. 2002 205 inlägg Frågan 4 feb. 2003 14:38 #1 Jag försöker använda en klass som hör till a-tagen, men lyckas inte.
Så här ser det ut i css:en:
a {color: #32496C; font-weight: bold; text-decoration:none;}
a:hover {text-decoration:underline;}
a:link { color: #32496C; font-weight: bold}
a:visited {color: #32496C; font-weight: bold}
a:active {color: #32496C; font-weight: bold}
a.white { color: white; font-weight: bold }
Och så här ser länken ut:
<a class="white" href="laggtill.php">Lägg till bild</a>
Vad gör jag för fel?
D Dino Medlem sedan sep. 2001 1 914 inlägg a:link { color: #32496C; font-weight: bold; text-decoration:none;}
a:visited {color: #32496C; font-weight: bold; text-decoration:none;}
a:active {color: #32496C; font-weight: bold; text-decoration:none;}
a:hover {text-decoration:underline;}
a.white {color: white; font-weight: bold }
K kittlos Medlem sedan sep. 2002 205 inlägg det hjälpte tyvärr inte. Kan det vara så att visited är överordnad klassen white? Det funkar nämligen på nya länkar, men inte befintliga, som alltså är visited.
hypatia Medlem sedan feb. 2001 6 388 inlägg Jag hade samma problem för ett tag sedan och löste det genom att specificera färger för visited osv. även i den class som hör till a-taggen. :)
a:link { color: #32496C; font-weight: bold; text-decoration:none;}
a:visited {color: #32496C; font-weight: bold; text-decoration:none;}
a:active {color: #32496C; font-weight: bold; text-decoration:none;}
a:hover {text-decoration:underline;}
a.white:link {color: white; font-weight: bold; }
a.white:visited {color: white; font-weight: bold; }
a.white:active {color: white; font-weight: bold; }
J jarvklo Medlem sedan juli 2001 3 378 inlägg Precis - Man bör specificera alla dessa :whatever-pseudo-klasser även för klassen white, efttersom a.white:visited annars inställningarna för a:visited osv på samma sätt som div.foo ärver inställningarna för div ;)