Aller au contenu

Pb valication w3c


mandala75

Sujets conseillés

Bonjour,

Je viens de faire une recherche rapide mais je n'ai pas trouvé réponse à mon pb.

J'essaie de valider une page w3c mais on m'indique que

there is no attribute "LEFTMARGIN"

<BODY bgColor="#f7f7f7" leftMargin="0" topMargin="0" marginheight="0" marginwidt

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.

Comment remplacer les attributs marginwidth, marginheight etc.

Merci d'avance

Modifié par mandala75
Lien vers le commentaire
Partager sur d’autres sites

<BODY bgColor="#f7f7f7" leftMargin="0" topMargin="0" marginheight="0" marginwidt

Cette ligne, tu peux la remplacer de la manière suivante:

<body>

et tu mets juste avant la balise </head> ceci:

<style type="text/css" media="all">
/* <![CDATA[ */
body { margin: 0; padding: 0; background-color: #f7f7f7; }
/* ]]> */
</style>

Tu obtiendras ainsi le même effet visuel, et ta page passera le validateur :)

Lien vers le commentaire
Partager sur d’autres sites

Veuillez vous connecter pour commenter

Vous pourrez laisser un commentaire après vous êtes connecté.



Connectez-vous maintenant
×
×
  • Créer...