CSS
Most_high
-
notobe Messages postés 2222 Statut Membre -
notobe Messages postés 2222 Statut Membre -
Bonjour,
Alors voilà, j'ai fait mon site et j'ai voulu valider mon CSS sur W3C valodator. Mais il m'affiche 10 erreures que je ne comprends pas... -_-' est ce que quelqu'un pourrait m'aider??? ça serait super sympa!
Mon CSS:
@charset "utf-8";
/* CSS Document */
<!-- /* ***********************************************************
Modèle d'en-tête CSS
Fichier: css_ff.css
Date: 12 octobre 2005
Version: 1.0
Auteur: Marras Ugo
Langage: XHTML 1.0
DTD: Strict
Langue: Français
***************************************************************
Liens:
12 octobre 2005 / Marras Ugo
- utilisé dans le fichier index.html
- utilisé dans le fichier projet2.html
- utilisé dans le fichier projet3.html
- utilisé dans le fichier projet4.html
- utilisé dans le fichier projet5.html
jj mois AAAA / Nom Prénom
- xxxxxxxx...
***************************************************************
Modifications:
16 janvier 2011 / Marras Ugo
- ajouté au pages du projet
jj mois AAAA / Nom Prénom
- xxxxxxxx...
***************************************************************
Objectif: Mettre en place une en-tête pour chaque page de style
************************************************************** */ -->
/* Le tout */
body {
background:#626262;
margin-top:20px;
margin-bottom:20px;
text-align:center;
font-size:11px;
font-family:arial, helvetica, verdana, sans-serif;
color:#3c3c3e;
}
h1,h2,h3,h4,h5,h6 {
color:green;
text-decoration:underline;
}
img {
hspace:0;
vspace:0;
border:0 none;
}
table {
margin:0;
padding:0;
border:0;
cellspacing:0;
cellpadding:0;
}
#textpied{
color:#FFFF00;
text-decoration:underline;
}
#container {
border:0;
margin:0 auto;
background:#000000;
width:910px;
text-align:left;
}
#baniere {
height:200px;
}
#menu {
height:90px;
text-align:center;
}
#content {
margin-left:6px;
margin-right:10px;
}
#pied {
padding-left:6px;
height:20px;
padding-top:3px;
font-size:10px;
background:#4B4B4B;
}
#ombre{
margin-bottom:30px;
}
.theme{
color:green;
}
a:link, a:visited {
color:#5F3C35;
font-weight:bold;
text-decoration:none;
}
a:hover {
color:#967068;
font-weight:bold;
text-decoration:none;
}
p {
margin:0;
color:green;
font-size:15px;
}
.common_text {
font-size:12px;
font-family:arial, helvetica, verdana, sans-serif;
text-align:justify;
color:#3c3c3e;
}
.common_title {
font-size:13px;
font-family:arial, helvetica, verdana, sans-serif;
text-transform: uppercase;
font-weight:bold;
color:#3c3c3e;
}
.common_bold {
font-size:12px;
font-family:arial, helvetica, verdana, sans-serif;
font-weight:bold;
color:#3c3c3e;
}
.common_italic {
font-size:12px;
font-family:arial, helvetica, verdana, sans-serif;
font-style: italic;
color:#3c3c3e;
}
.formulaire {
text-decoration:underline;
color:#CC0000;
font-size:#20px;
font-family:arial, helvetica, verdana, sans-serif;
}
Alors voilà, j'ai fait mon site et j'ai voulu valider mon CSS sur W3C valodator. Mais il m'affiche 10 erreures que je ne comprends pas... -_-' est ce que quelqu'un pourrait m'aider??? ça serait super sympa!
Mon CSS:
@charset "utf-8";
/* CSS Document */
<!-- /* ***********************************************************
Modèle d'en-tête CSS
Fichier: css_ff.css
Date: 12 octobre 2005
Version: 1.0
Auteur: Marras Ugo
Langage: XHTML 1.0
DTD: Strict
Langue: Français
***************************************************************
Liens:
12 octobre 2005 / Marras Ugo
- utilisé dans le fichier index.html
- utilisé dans le fichier projet2.html
- utilisé dans le fichier projet3.html
- utilisé dans le fichier projet4.html
- utilisé dans le fichier projet5.html
jj mois AAAA / Nom Prénom
- xxxxxxxx...
***************************************************************
Modifications:
16 janvier 2011 / Marras Ugo
- ajouté au pages du projet
jj mois AAAA / Nom Prénom
- xxxxxxxx...
***************************************************************
Objectif: Mettre en place une en-tête pour chaque page de style
************************************************************** */ -->
/* Le tout */
body {
background:#626262;
margin-top:20px;
margin-bottom:20px;
text-align:center;
font-size:11px;
font-family:arial, helvetica, verdana, sans-serif;
color:#3c3c3e;
}
h1,h2,h3,h4,h5,h6 {
color:green;
text-decoration:underline;
}
img {
hspace:0;
vspace:0;
border:0 none;
}
table {
margin:0;
padding:0;
border:0;
cellspacing:0;
cellpadding:0;
}
#textpied{
color:#FFFF00;
text-decoration:underline;
}
#container {
border:0;
margin:0 auto;
background:#000000;
width:910px;
text-align:left;
}
#baniere {
height:200px;
}
#menu {
height:90px;
text-align:center;
}
#content {
margin-left:6px;
margin-right:10px;
}
#pied {
padding-left:6px;
height:20px;
padding-top:3px;
font-size:10px;
background:#4B4B4B;
}
#ombre{
margin-bottom:30px;
}
.theme{
color:green;
}
a:link, a:visited {
color:#5F3C35;
font-weight:bold;
text-decoration:none;
}
a:hover {
color:#967068;
font-weight:bold;
text-decoration:none;
}
p {
margin:0;
color:green;
font-size:15px;
}
.common_text {
font-size:12px;
font-family:arial, helvetica, verdana, sans-serif;
text-align:justify;
color:#3c3c3e;
}
.common_title {
font-size:13px;
font-family:arial, helvetica, verdana, sans-serif;
text-transform: uppercase;
font-weight:bold;
color:#3c3c3e;
}
.common_bold {
font-size:12px;
font-family:arial, helvetica, verdana, sans-serif;
font-weight:bold;
color:#3c3c3e;
}
.common_italic {
font-size:12px;
font-family:arial, helvetica, verdana, sans-serif;
font-style: italic;
color:#3c3c3e;
}
.formulaire {
text-decoration:underline;
color:#CC0000;
font-size:#20px;
font-family:arial, helvetica, verdana, sans-serif;
}
2 réponses
-
Bonjour,
alors tout d'abord il faut enlever les balises de commentaires html<!-- -->
Je mettrais une majuscule au début de chaque nom de police.
Pour les images :border-style: none;
Il faudrait que tu postes sur le forum les résultats ou que tu donnes un lien vers la page de validation, ce serait très utile pour t'aider. -
img { hspace:0; vspace:0; border:0 none; } table { margin:0; padding:0; border:0; cellspacing:0; cellpadding:0; }
Tout ce que j'ai mis en gras ne sont pas des propriétés CSS.
Inutile aussi de mettre border:0 none. Soit 0 soit none. Mettre les 2 est redondant.
.formulaire { text-decoration:underline; color:#CC0000; font-size:#20px; font-family:arial, helvetica, verdana, sans-serif; }
pas de # devant la taille.
D'autre part, bien que ce ne soit pas cela qui provoque des erreurs :
- associer arial et verdana dans une liste de police n'est pas judicieux : verdana a un rendu beaucoup plus grand qu'arial : c'est un non sens de les associer.
- il est inutile de déclarer à chaque fois font-family : une fois dans le body suffit.
- font-size:11px est très pénible à lire : c'est trop petit !
- Il est de toute façon contre-indiqué de déclarer des tailles de polices en pixels : déclarer des em ou des %
<blockquote cite="Shakespeare">To be or not to be ; That is the question...</blockquote>