PDA

View Full Version : Validation errors in top nav bar


sixrfan
12-09-2009, 10:19 PM
my top nav bar consists of pics (which are hyperlinks) that change to other pics when hovered over.

the html code that is spit out by the validator is attached.

any idea how i clean up these validation errors? i tried changing the way the tags are closed, but that only caused new errors. please advise. thanks!



# Error Line 58, Column 270: NET-enabling start-tag not immediately followed by null end-tag

…ht="29" border="0" id="home" alt=""/ ></a><a href="menu.html" onmouseout="MM_


This error may occur when there is a mistake in how a self-closing tag is closed, e.g '.../ >'. The proper syntax is '... />' (note the position of the space).
# Error Line 58, Column 270: end tag for "img" omitted, but OMITTAG NO was specified

…ht="29" border="0" id="home" alt=""/ ></a><a href="menu.html" onmouseout="MM_


You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 58, Column 173: start tag was here

…,'','pics/buttons/home_down.jpg',1)"><img src="pics/buttons/home.jpg" name="h

Rowsdower!
12-09-2009, 10:34 PM
my top nav bar consists of pics (which are hyperlinks) that change to other pics when hovered over.

the html code that is spit out by the validator is attached.

any idea how i clean up these validation errors? i tried changing the way the tags are closed, but that only caused new errors. please advise. thanks!

I believe the issue is that this:
ht="29" border="0" id="home" alt=""/ >

should be like this:
ht="29" border="0" id="home" alt="" />

Notice that the space is still there but it is NOT between the "/" and ">" characters...

Let me know if that doesn't sort it out.

djm0219
12-09-2009, 10:36 PM
Closing tags are /> not / > so it's the space that is the cause of the errors. The comment for the first error you posted mentions this specifically too.

sixrfan
12-10-2009, 12:42 AM
thanks. that was too easy. should have caught that. :)

here's another that is stumping me:

66. <embed src="/pics/commercial1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="836" height="220"></embed>


the validation errors are:

Line 66, Column 14: Attribute "src" exists, but can not be used for this element.

<embed src="/pics/commercial1.swf" quality="high" pluginspage="http://www.macr

Line 66, Column 46: Attribute "quality" is not a valid attribute

…src="/pics/commercial1.swf" quality="high" pluginspage="http://www.macromedia

Line 66, Column 65: Attribute "pluginspage" is not a valid attribute

…al1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashpla

Line 66, Column 116: Attribute "type" exists, but can not be used for this element.

…romedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="83

Line 66, Column 154: Attribute "width" exists, but can not be used for this element.

…pplication/x-shockwave-flash" width="836" height="220"></embed>

Line 66, Column 167: Attribute "height" exists, but can not be used for this element.

…shockwave-flash" width="836" height="220"></embed>

Line 66, Column 172: element "embed" undefined. Did you mean "meta" or "em"?

…wave-flash" width="836" height="220"></embed>


in each instance, except the last, one of the quotation marks is highlighted and the validator tells me:
"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). "

so i need to delete these attributes? really?

and in the last error, the closing > is highlighted and the validator says:
"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."

what should i do here? thanks!!!!!!!

Apostropartheid
12-10-2009, 04:36 PM
embed isn't a valid element in XHTML 1.0. Use the object tag instead.

sixrfan
12-10-2009, 05:46 PM
well when i change <embed> to <object> in that line of code, yes, the validation error goes away, however that flash file no longer appears on my page! please advise how i fix. i need the flash file to show. thanks!


here's a look at the actual html:

<div id="flash"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0">
<param name="movie" value="/pics/commercial1.swf" />
<param name="quality" value="high" />
<embed src="/pics/commercial1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="836" height="220"></embed>
</object>
</div>

Apostropartheid
12-10-2009, 07:41 PM
You've still got the embed in there >.<


<object type="application/x-shockwave-flash"
data="/pics/commercial1.swf" width="836" height="220">
<param name="movie" value="/pics/commercial1.swf"/>
<param name="quality" value="high"/>
</object>

sixrfan
12-11-2009, 07:00 PM
got it. thanks!