Feuille de style en colère

Eléphanteau du PHP | 12 Messages

09 nov. 2005, 12:06

Voilà, j'ai crée une mise en forme pour mes liens, seulement quand j'affiche ma page, il n'en tient absolument pas compte et utilise les polices et couleurs par défaut. Par contre tout le reste de la feuille de style fonctionne.
Voilà ce que j'ai mis :

A : link { font-family: Arial; font-size: 9px; font-family: Arial; text-align: center ; color : #FFFFFF; text-decoration : none;}
A : visited { font-family: Arial; font-size: 9px; font-family: Arial; text-align: center ; color : #FFFFFF; text-decoration : none;}
A : active { font-family: Arial; font-size: 9px; font-family: Arial; text-align: center ; color : #FFFFFF; text-decoration : none;}
A : hover { font-family: Arial; font-size: 9px; font-family: Arial; text-align: center ; color : #FFFFFF; text-decoration : none;}

Le code me semble bon, normalement il devrait m'afficher tous les liens en arial blanc etc. Ca m'étonne d'autant plus qu'il s'agit d'un copié collé d'une autre feuille de style avec les liens rouges et ça marchait parfaitement.

Avatar du membre
ViPHP
ViPHP | 3008 Messages

09 nov. 2005, 12:07

Code : Tout sélectionner

A : link { font-family: Arial; font-size: 9px; font-family: Arial; text-align: center ; color : #FFFFFF; text-decoration : none;} A : visited { font-family: Arial; font-size: 9px; font-family: Arial; text-align: center ; color : #FFFFFF; text-decoration : none;} A : active { font-family: Arial; font-size: 9px; font-family: Arial; text-align: center ; color : #FFFFFF; text-decoration : none;} A : hover { font-family: Arial; font-size: 9px; font-family: Arial; text-align: center ; color : #FFFFFF; text-decoration : none;}
font-family: Arial; en double exemplaire ?

:arrow:

Code : Tout sélectionner

A:link { font-family: Arial; font-size: 9px; text-align: center ; color : #FFFFFF; text-decoration : none;} A:visited { font-family: Arial; font-size: 9px; text-align: center ; color : #FFFFFF; text-decoration : none;} A:active { font-family: Arial; font-size: 9px; text-align: center ; color : #FFFFFF; text-decoration : none;} A:hover { font-family: Arial; font-size: 9px; text-align: center ; color : #FFFFFF; text-decoration : none;}
Il faut que tu enlèves les espaces entre les a : link...etc

Code : Tout sélectionner

A : link A : visited A : active A : hover
devient

Code : Tout sélectionner

A:link A:visited A:active A:hover

Eléphant du PHP | 353 Messages

09 nov. 2005, 13:09

Et ça se simplifie en:

Code : Tout sélectionner

a { font-family: Arial; font-size: 9px; text-align: center ; color : #FFFFFF; text-decoration : none; }
puisque les 4 styles que tu présentes sont identiques.

Tu peux ensuite en spécialisé si tu veux:

Code : Tout sélectionner

a:hover { text-decoration: underline }

Eléphanteau du PHP | 12 Messages

09 nov. 2005, 13:54

Ca marche merci !