PDA

View Full Version : help with w3 errors



Chad
Tue 31st Jul '07, 5:21pm
Trying to get the site as clean and 'valid' as possible according to w3 standards.

Unfortunately it is showing 89 errors now. Horrible (even though site loads instantly and displays fine). Most of them are these errors that I cannot figure out and need help on.

.................................................. ..........

Line 897, Column 67: end tag for "img" omitted, but OMITTAG NO was specified

…" src="images/yes.gif" width="16" height="16"></td> ✉ (http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.talkjesus.com%2 F;errmsg_id=70#errormsg)
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 897, Column 2: start tag was here. <img alt="Check" src="images/yes.gif" width="16" height="16"></td>

.................................................. ..........

Line 960, Column 188: there is no attribute "allowtransparency".…" scrolling="auto" allowtransparency="yes" name="cboxmain" id="cboxmain" stylLine 2288, Column 105: ID "collapseimg_forumhome_activeusers" already defined.…e('forumhome_activeusers')"><img id="collapseimg_forumhome_activeusers" src="


An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).

.................................................. ..........

What exactly are they saying here and HOW would I resolve this correctly?

Onimua
Tue 31st Jul '07, 6:01pm
You didn't close your images properly. In XHTML, it's a self-closing tag.

So instead of


<img src="image URL" height="x" width="y" border="0" alt="">

It becomes


<img src="image URL" height="x" width="y" border="0" alt="" />

As for the ID issue, you need to make a new name. ID names can only be used once per page; you'll have to change it to another name for that error to make it go away.

Chad
Tue 31st Jul '07, 6:06pm
Thanks. I just went from 89 to 41 errors just from fixing images. Completely forgot about the end / mark.

I also removed this to bring it down to 40 errors. About 5 are coming from the highslide mod which I posted in its thread but received no response yet. Maybe you'd know?

allowtransparency="yes"

.................................................. ..........

Line 712, Column 15: ID "highslide-container" already defined.</div><div id="highslide-container"></div> ✉ (http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.talkjesus.com%2 F;errmsg_id=141#errormsg)
An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).
.................................................. ..........

Line 705, Column 9: ID "highslide-container" first defined here.<div id="highslide-container"></div>

.................................................. ..........

Line 713, Column 9: ID "controlbar2" already defined.<div id="controlbar2" class="highslide-overlay controlbar2"> ✉ (http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.talkjesus.com%2 F;errmsg_id=141#errormsg)
An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).

.................................................. ..........

Line 866, Column 39: character data is not allowed here.<table style="width: 100 cellspacing="3" cellpadding="3"> ✉ (http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.talkjesus.com%2 F;errmsg_id=63#errormsg)
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:
putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML (http://www.cs.tut.fi/%7Ejkorpela/html/empty.html)....................................... ......................

Line 866, Column 14: literal is missing closing delimiter.<table style="width: 100 cellspacing="3" cellpadding="3"> ✉ (http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.talkjesus.com%2 F;errmsg_id=38#errormsg)
Did you forget to close a (double) quote mark?

.................................................. ..........


I really appreciate the help! Let's bring it down to zero errors :o

Onimua
Tue 31st Jul '07, 6:12pm
If you actually read the errors, they tell you what's wrong.

Like I said, you can't have IDs of the same name on a page more than once. Change the ID to class and it may work.

... you forgot to close the width attribute in your table.

Chad
Tue 31st Jul '07, 6:12pm
In regards to unique ID names, I am having a strange problem.

I have custom drop down menus in navbar and they look like this:

<td id="1" class="nav_menu_control" style="width: 81px">
(in header template)

<div class="vbmenu_popup" id="1_menu" style="display:none">
(in navbar template)

The above is default (showing errors in w3 validation) yet they work fine.

IF I change the ID each to something like below, it shows the menu title but no longer drops down the sub menu, nor shows the down arrow icon (indicating drop down menu)

<td id="menu1" class="nav_menu_control" style="width: 81px">
<div class="vbmenu_popup" id="menu1_menu" style="display:none">

Chad
Tue 31st Jul '07, 6:13pm
... you forgot to close the width attribute in your table.


Which table error message are you referring to?

Onimua
Tue 31st Jul '07, 6:15pm
In regards to unique ID names, I am having a strange problem.

I have custom drop down menus in navbar and they look like this:

<td id="1" class="nav_menu_control" style="width: 81px">
(in header template)

<div class="vbmenu_popup" id="1_menu" style="display:none">
(in navbar template)

The above is default (showing errors in w3 validation) yet they work fine.

IF I change the ID each to something like below, it shows the menu title but no longer drops down the sub menu, nor shows the down arrow icon (indicating drop down menu)

<td id="menu1" class="nav_menu_control" style="width: 81px">
<div class="vbmenu_popup" id="menu1_menu" style="display:none">

Is this from a modification of some sort?


Which table error message are you referring to?

This one:

Line 866, Column 14: literal is missing closing delimiter.<table style="width: 100 cellspacing="3" cellpadding="3"> ✉ (http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.talkjesus.com%2 F;errmsg_id=38#errormsg)
Did you forget to close a (double) quote mark?

Chad
Tue 31st Jul '07, 6:19pm
The drop down custom menus, yes its a simple mod here
http://www.vbulletin.org/forum/showthread.php?t=129074

On a side note, I tried searching for the width error in phrases and template, it pulled up nothing. Any tips on tracing where its coming from?

I searched using this small piece (and entire code, both returned nothing)

<table style="width: 100 c


Even viewing page source info on home page does not show this

<table style="width: 100 c

Onimua
Tue 31st Jul '07, 6:24pm
I don't know where it's getting it from. Check the forum when you're logged out and look at the source then.

As for your modification, I can't help with someone else's mod, and this isn't the site for help with that. :) The mod there says it's supported, so you can contact the author of it and they can perhaps help.

Chad
Tue 31st Jul '07, 6:34pm
Thanks. Regarding this error

<table style="width: 100 cellspacing="3" cellpadding="3">

I found the trace by viewing source code when LOGGED OUT. I went to that phrase and odd enough, the code DID have the proper closing "

<table style="width: 100%" cellspacing="3" cellpadding="3">

How can that be? I'm 100% confident it is in the phrase I checked because it is something (welcome message) shown only to guests/visitors.

Could it be the % mark?

Onimua
Tue 31st Jul '07, 6:44pm
I don't know, but since it's a table, you could just have it set to this:


<table width="100%" cellspacing="3" cellpadding="3">

Chad
Tue 31st Jul '07, 6:47pm
Unfortunately that did not fix it, only cramped the table as narrow as possible

At the same time, still getting the same w3 error.

Onimua
Tue 31st Jul '07, 6:52pm
Oh, this is a complete custom style/page; you didn't mention that. There could be various reasons as to why it's doing that and the errors your getting.