CSS Link

Status
Nicht offen für weitere Antworten.

PC Freak

Erfahrenes Mitglied
Meine Seite hat eine einheitliche Linkfarbe (per CSS)

Die Links unter H1 sollen allerdings weiss sein. Irgendwie klappt der Code aber nicht:

HTML:
H1

{

color: white;

   A:link {color: blue;}        /* specificity = 1,1 */
   A:active {color: red;}       /* specificity = 1,1 */
   A:hover {color: magenta;}    /* specificity = 1,1 */
   A:visited {color: purple;}   /* specificity = 1,1 */


display: inline;

font-family: verdana, arial, sans-serif;

font-size: 10pt;

font-weight: bold;

background-image: url(images/hg.gif);

}

Was ist falsch ?
 
Hi,

Du versuchst, Style-Definitionen zu verschachteln. Das ist falsch. Der Aufbau müsste so aussehen:
CSS:
h1 {
   color: white;
   ...
}
h1 a:link {
   color: blue;
}
h1 a:active {
   color: red;
}
...

Lektüre: Selfhtml

LG
 
Status
Nicht offen für weitere Antworten.
Zurück