• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

[Frage Validierung] Im Element `nav` ist das Attribut `ID` nicht erlaubt.

E

eXtremous

Guest
Hallo HTML.de Community,

ich habe meine Seite * durch den Validierungsdienst geschickt, und nun fast alle Fehler weg (noch nicht ganz, bin dabei). Die neue, verbesserte Version befindet sich hier: *

Den Fehler, den ich nicht weg bekomme, ist:

Zeile 57 Spalte:6 Fehler: Im Element `nav` ist das Attribut `ID` nicht erlaubt. Fehlerstelle:<nav id="nav">
Spalte:1 Fehler: Unbekanntes Element `nav`. Eine Liste der erlaubten Elemente finden Sie hier.Fehlerstelle:<nav id="nav">
Die englische Seite sagt dazu:

  1. error.png
    Line 57, Column 9: there is no attribute "ID"

    <nav id="nav">
    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. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
  2. error.png
    Line 57, Column 14: element "NAV" undefined

    <nav id="nav">
    You have used the element named above in your document, but the document type you are using does not define an element of that name. 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 "Frameset" document type to get the "<frameset>" element),
    • by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
    • by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).

CSS Datei: */design.css

Über Hilfe würde ich mich sehr freuen! Vielen Dank!!!

viele Grüße,
eXtremous
 
Zuletzt bearbeitet von einem Moderator:
Werbung:
HTML:
<nav>
ist für HTML5 .. Nicht für HTML 4.01 Transitional was du benutzt!
Setze das Navi einfach in eine div Box, und das Problem sollte weg sein.
 
Danke für die Antwort. Entweder mache ich es falsch oder etwas stimmt immer noch nicht:

<div id="nav">
[...]
</div>

?

Jetzt zeigt es das CSS nicht mehr an. Stehe echt auf dem Schlauch im Moment .
 
Werbung:
Code:
nav#nav {background:#b7d562;} nav#nav ul li {background:url('bilder/navi_bg.png') no-repeat; text-align: center;  width:156px; height:35px; margin:5px 0} nav#nav ul li a {display:block; color:#fff; font-weight:bold; font-size:1.5em; text-shadow:0 0 3px #000; text-decoration:none; padding:5px 10px; -webkit-transform: rotate(-0deg);  -moz-transform: rotate(-0deg);    } nav#nav ul li a:hover {color:#f00} nav#nav ul {list-style:none; margin:0; padding:0;} nav#nav ul {font:300 12px/1.4 Arial,sans-serif;}
Die ersten "nav" müssen weg .. Also
Code:
 #nav {background:#b7d562;} #nav ul li {background:url('bilder/navi_bg.png') no-repeat; text-align: center;  width:156px; height:35px; margin:5px 0} #nav ul li a {display:block; color:#fff; font-weight:bold; font-size:1.5em; text-shadow:0 0 3px #000; text-decoration:none; padding:5px 10px; -webkit-transform: rotate(-0deg);  -moz-transform: rotate(-0deg);    } #nav ul li a:hover {color:#f00} #nav ul {list-style:none; margin:0; padding:0;} #nav ul {font:300 12px/1.4 Arial,sans-serif;}
 
Zuletzt bearbeitet:
Super!!! Vielen Dank TobiasBohn! :D

/Thread kann geschlossen werden
 
Werbung:
Zurück
Oben