kittlosMedlem sedan sep. 2002205 inlägg 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?
DinoMedlem sedan sep. 20011 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 }
kittlosMedlem sedan sep. 2002205 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.
hypatiaMedlem sedan feb. 20016 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; }
jarvkloMedlem sedan juli 20013 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 ;)