Hallo,
#auswahl a:link
{
color: #333;
text-decoration: none;
padding-bottom: 1px;
}
#auswahl a:aktive
{
color: #333;
text-decoration: none;
padding-bottom: 1px;
}
#auswahl a:visited
{
color: #333;
text-decoration: none;
padding-bottom: 1px;
}
#auswahl a:hover
{
color: #000;
text-decoration: none;
padding-bottom: 1px;
border-bottom: 1px solid #000;
}
in dem Beispiel ist das Layout für a, aktiv und visited gleich, nur hover ist anders.
Kann man die gleichen zusammenfassen?
Gibt es so was wie eine "oberklasse" ?
Danke
Andy
Hallo Andy!
Einfach mit nem Komma abtrennen:
#auswahl a:link, #auswahl a:aktive, #auswahl a:visited
{
color: #333;
text-decoration: none;
padding-bottom: 1px;
}
#auswahl a:hover
{
color: #000;
text-decoration: none;
padding-bottom: 1px;
border-bottom: 1px solid #000;
}
Es reicht, wenn du zur Grunddefinition nur das angibst, was jeweils abweichen soll:
Code:#auswahl a { color: #333; text-decoration: none; padding-bottom: 1px; } #auswahl a:hover { color: #000; border-bottom: 1px solid #000; }
Hallo Sandmann und Sejuma,
danke.
so hatte ich es auch gedacht, aber Firefox mag das nicht.
Dann habe ich die Variante von Sejuma gefunden, die funktioniert im Firefox.
Danke für den Link, kannte ich nicht. Allerdings finde ich da Pseudo-Klassen: :link und Unterschiedliche Pseudoformate für Hyperlinks , aber nicht das was ich suche.
Sejuma hat das aber gut erklärt.
Andy
Geändert von Andy89 (05.08.2008 um 19:08 Uhr) Grund: was vergessen
Die Angaben sollten meines Wissens nach immer nach dem "LoVe-HAte"-Prinzip gemacht werden (link, visited, hover, active).
Das gibt es nicht#auswahl a:aktive![]()
...Meine Meinung
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)