Forum-webmaster
Technique - programmation => HTML / CSS / XHTML => Message commencé par: damb341 le le 28-10-2011 a 09:04:15

Titre: Probleme validation w3c
Posté par: damb341 le le 28-10-2011 a 09:04:15

Bonjour à tous,

J'ai un soucis avec la validation et je voulais savoir, si vous pouviez m'expliquer, moi newbie dans la matière, ce qu'il veut dire :

Line 39, Column 57: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
      <a href="nospacks.html"><div class="menu nos_packs-in"></div></a>
&#9993;
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Line 40, Column 51: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
      <a href="tutos.html"><div class="menu tutoriaux"></div></a>
&#9993;
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Line 41, Column 57: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
      <a href="devis.php"><div class="menu demande_de_devis"></div></a>
&#9993;
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Line 42, Column 57: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
      <a href="contact.php"><div class="menu nous_contacter">
&#9993;
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Line 116, Column 7: end tag for "div" omitted, but OMITTAG NO was specified
</body>
&#9993;
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Line 36, Column 1: start tag was here
<div class="wrapper">



Qu'en pensez vous?

Titre: Re:Probleme validation w3c
Posté par: vieactu le le 30-10-2011 a 08:32:35

Les explications sont déjà dedans.
Traduis les en français à la rigueur, il n'y a pas grand chose à ajouter.

Titre: Re:Probleme validation w3c
Posté par: damb341 le le 30-10-2011 a 09:48:09

Peut etre inverser :

<a href="nospacks.html"><div class="menu nos_packs-in"></div></a>

par

<div class="menu nos_packs-in"><a href="nospacks.html"></a></div> ?

Non?

Titre: Re:Probleme validation w3c
Posté par: Pad le le 01-11-2011 a 18:13:07

oui c'est mieux ainsi !

Titre: Re:Probleme validation w3c
Posté par: MarvinLeRouge le le 01-11-2011 a 18:53:17

Ça dépend du doctype; en html5, tu as le droit (il me semble) ;D

Titre: Re:Probleme validation w3c
Posté par: damb341 le le 02-11-2011 a 08:10:40

Citation de: MarvinLeRouge le le 01-11-2011 a 18:53:17
Ça dépend du doctype; en html5, tu as le droit (il me semble) ;D


tu parles de ça? ;)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Titre: Re:Probleme validation w3c
Posté par: damb341 le le 02-11-2011 a 10:59:33

Jviens d'essayer mais ca ne marche pas. Puisque dans le premier sens je disais :

le lien est sur la div complete,
or quand je fais comme j'ai dit finalement j'ai
dans la div il y a un lien mais sur rien du tout

:( mais bon, je doute que cela gene vraiment, mais bon un w3c vierge c'est toujours le top ^^

Titre: Re:Probleme validation w3c
Posté par: MarvinLeRouge le le 03-11-2011 a 10:51:33

Ce que je voulais dire, c'est que div est un élément de type bloc, et a un élément de type inline, et qu'on n'a pas le droit de mettre un élément de type bloc dans un élément de type inline.

HTML5 s'est débarassé de cette notion, tu as donc le droit, si ton document est déclaré en html5 (oui, grâce à la ligne que tu as indiquée qu'il faudrait modifier), de mettre un div dans un a.

Titre: Re:Probleme validation w3c
Posté par: damb341 le le 06-11-2011 a 18:02:39

Oki je vais voir ^^


Forum-webmaster | Actionné par YaBB SE
© 2001-2003, YaBB SE Dev Team. Tous droits réservés.