View Full Version : Im Trying to XHTML Validate my board...
Guy G
02-12-2005, 08:42 AM
Im trying to validate my forum, so far i had 139 errors..
I got them down to 59 errors.
But there are some things that i dont know even how to approach in order to fix them...
I cant fix all of these errors:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.ex-zone.com%2Fforum%2Findex.php&charset=%28detect+automatically%29&doctype=%28detect+automatically%29
If anyone would be kind enough to have a look an tell me how to fix some ill be happy...(most errors are of the same kind)
Thanks,
www.ex-zone.com
Dean C
02-12-2005, 11:06 AM
Half of those errors are due to incorrect nesting. As you're validating your XHTML i'm assuming you know the three golden rules. Nesting should be consistent being one of them. Go through your code and find out where you are not closing tags etc. Then that'll narrow it down so we can help some more :)
Princeton
02-12-2005, 12:45 PM
yep, I agree ... and
1. you are using deprecated tags/attributes.
2. image tags are not being closed properly
Guy G
02-12-2005, 01:47 PM
Half of those errors are due to incorrect nesting. As you're validating your XHTML i'm assuming you know the three golden rules. Nesting should be consistent being one of them. Go through your code and find out where you are not closing tags etc. Then that'll narrow it down so we can help some more
So nesting is the issue.... ill try and see if i can do it. loads of code there.
yep, I agree ... and
1. you are using deprecated tags/attributes.
2. image tags are not being closed properly
What do u mean deprecated tags \ attr ?
and where is there an error about improper closure of an img tag?
Princeton
02-12-2005, 01:53 PM
valign is a deprecated attribute
onClick should be onclick
etc.
<img src="" alt="" title="" /> <-- the proper way to close image when using XHTML
FYI: All tags that do not have a closing end should be closed properly.
Guy G
02-12-2005, 02:08 PM
valign is a deprecated attribute
onClick should be onclick
etc.
<img src="" alt="" title="" /> <-- the proper way to close image when using XHTML
FYI: All tags that do not have a closing end should be closed properly.
The onclick will be fixed.
Whats the replacement for valign?
and all the single tag tags are closed.
sabret00the
02-12-2005, 02:22 PM
The onclick will be fixed.
Whats the replacement for valign?
and all the single tag tags are closed.
style="vertical-align: top"
:)
Guy G
02-12-2005, 02:41 PM
style="vertical-align: top"
Thanks m8 :D
Hmmm valign doesnt seem to affect it to be XHTML valid...
Dean C
02-12-2005, 05:07 PM
Sort out those nesting issues Guy! :p lol
Guy G
02-14-2005, 08:54 AM
Sort out those nesting issues Guy! :p lol
Can't... The skin company did a loousy job on nesting it.
And going through all that code would be crazy...
neocorteqz
02-14-2005, 09:10 AM
Can't... The skin company did a loousy job on nesting it.
And going through all that code would be crazy... not that hard. :) Yes it will take a long time, but it's not that hard. :)
Guy G
02-14-2005, 09:29 AM
To be honest, i have no idea how to fix them...
For example:
Line 352, column 942: end tag for "td" omitted, but OMITTAG NO was specified
...f')"> </td> </tr> </table> </div> <!-- nav buttons bar --> <div align="l
You may have neglected to close a tag, or perhaps you meant to "self-close" a tag; that is, ending it with "/>" instead of ">".
I found where it is. But i dont understand this line "end tag for "td" omitted, but OMITTAG NO was specified"
...
Dean C
02-14-2005, 09:35 AM
It means incorrect nesting. Either you've started a <td> tag and not closed it, or you've wrote a </td> when there is no <td> to start it.
Guy G
02-14-2005, 10:40 AM
It means incorrect nesting. Either you've started a <td> tag and not closed it, or you've wrote a </td> when there is no <td> to start it.
Ok i see... i think i know where the problem is than... thanks.
Ok so i got it to 27 errors alone.. check it here: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.ex-zone.com%2Fforum%2Findex.php&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&ss=1&sp=1#line-352
now it seems most of the errors generate out of this block. anyone willing to have a quick look?
//--> </script> <!-- logo --> <a name="top"></a> <div align="center">
<table width="85%" border="0" cellspacing="0" cellpadding="1"> <tr> <td bgcolor="#000000">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td width="100%" align="left" style="vertical-align: top">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>
<td bgcolor="#FFFFFF"> <table cellpadding="1" width="100%">
<tr> <td bgcolor="#304157"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>
<td align="left" style="background-image: url('images/satellite/header/header_bg.gif')" bgcolor="#F2F4F6">
<a href="index.php"><img src="images/satellite/header/logo.gif" border="0" alt="" /></a></td> </tr> </table>
<!-- /logo -->
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="22" style="background-image: url('images/satellite/gradients/nav_top_blue.gif')"> </td>
</tr> </table> </div> <!-- nav buttons bar -->
<div align="left"> <table class="tborder" cellpadding="100%" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center"> <!--<td class="vbmenu_control"><a href="index.php?amp;">Home</a></td>--> <td class="vbmenu_control"><a href="register.php?amp;">Register</a>
</td> <td class="vbmenu_control"><a href="faq.php?amp;" accesskey="5">FAQ</a></td> <td class="vbmenu_control">
<a href="memberlist.php?amp;">Members List</a></td> <td class="vbmenu_control"><a href="calendar.php?amp;">Calendar</a>
</td> <td class="vbmenu_control"><a href="forumdisplay.php?amp;do=markread">Mark Forums Read</a></td> <td class="vbmenu_control"><a href="#bottom">Bottom</a></td>
</tr>
</table> </div> <!-- / nav buttons bar --> <div align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>
<td height="19" style="background-image: url('images/satellite/gradients/nav_bottom_bg.gif')"> </td>
</tr> </table> </div> <!-- content table --> <!-- BEGIN TEMPLATE: spacer_open --> <!-- open content container --> <div align="center">
<div class="page" style="width:100%; text-align:left"> <div style="padding:0px 15px 0px 15px"> <!-- END TEMPLATE: spacer_open -->
<p></p> <div align="center" style="font-size: 20px; font-family: tahoma, verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif
neocorteqz
02-14-2005, 01:04 PM
Ok i see... i think i know where the problem is than... thanks.
Ok so i got it to 27 errors alone.. check it here: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.ex-zone.com%2Fforum%2Findex.php&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&ss=1&sp=1#line-352
now it seems most of the errors generate out of this block. anyone willing to have a quick look?
//--> </script> <!-- logo --> <a name="top"></a> <div align="center">
<table width="85%" border="0" cellspacing="0" cellpadding="1"> <tr> <td bgcolor="#000000">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td width="100%" align="left" style="vertical-align: top">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>
<td bgcolor="#FFFFFF"> <table cellpadding="1" width="100%">
<tr> <td bgcolor="#304157"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>
<td align="left" style="background-image: url('images/satellite/header/header_bg.gif')" bgcolor="#F2F4F6">
<ahref="index.php"><imgsrc="images/satellite/header/logo.gif"border="0"alt=""/></a></td></tr></table>
<!-- /logo -->
<tablewidth="100%"border="0"cellspacing="0"cellpadding="0"><tr><tdheight="22"style="background-image:url('images/satellite/gradients/nav_top_blue.gif')"> </td>
</tr> </table> </div> <!-- nav buttons bar -->
<divalign="left"><tableclass="tborder"cellpadding="100%"cellspacing="0"border="0"width="100%"align="center"style="border-top-width:0px">
<tralign="center"><!--<tdclass="vbmenu_control"><ahref="index.php?amp;">Home</a></td>--><tdclass="vbmenu_control"><ahref="register.php?amp;">Register</a>
</td><tdclass="vbmenu_control"><ahref="faq.php?amp;"accesskey="5">FAQ</a></td><tdclass="vbmenu_control">
<ahref="memberlist.php?amp;">MembersList</a></td><tdclass="vbmenu_control"><ahref="calendar.php?amp;">Calendar</a>
</td><tdclass="vbmenu_control"><ahref="forumdisplay.php?amp;do=markread">MarkForumsRead</a></td><tdclass="vbmenu_control"><ahref="#bottom">Bottom</a></td>
</tr>
</table> </div> <!-- /navbuttonsbar--><divalign="center"><tablewidth="100%"border="0"cellspacing="0"cellpadding="0"><tr>
<td height="19" style="background-image: url('images/satellite/gradients/nav_bottom_bg.gif')"> </td>
</tr> </table> </div><!--contenttable--><!--BEGIN TEMPLATE: spacer_open--><!--opencontentcontainer --><div align="center">
<divclass="page"style="width:100%;text-align:left"><divstyle="padding:0px15px0px15px"><!-- END TEMPLATE:spacer_open-->
<p></p><divalign="center"style="font-size:20px;font-family:tahoma,verdana,geneva, lucida,'lucida grande',arial,helvetica,sans-serif
I could figure it out better if I could see the template. Or Just the section of code in question.
It would take me some time to figure out what's what with thecodepastedfrom the results from your XHTML Vebose validation. I see things easierin the templates than i do with the raw ouput.
But if you want to do it yourself, take in the template that code isin, and where you see an open tag like <td>, and Close it
for example.
<td class="vbmenu_control"><a href="usercp.php?$session[sessionurl]">$vbphrase[user_cp]</a></td>
The above is proper.
<td class="vbmenu_control"><a href="usercp.php?$session[sessionurl]">$vbphrase[user_cp]</a>
The above is not proper, it is missing a </td> tag.
If you see an open <tr> tag also close it.
Note the following example.
<!-- Arcade Search -->
<tr>
<td class="thead">Arcade Game Search</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<formaction="arcade.php?do=category"method="post">
<inputtype="text"class="bginput"name="search"size="20"/>$gobutton<br/>
</form>
</td>
</tr>
<!--ArcadeSearch-->
Unless i made a mistake (which i shouldn't have it's not my code. :)) That is proper.
all it is, is going through your template and where you see a tag open and not closed. close it.
Now when you start to close all the open tags most of the other stuffshould go away with it, because it's directly linked to the error's forthe non closed tags.
now if you see this
Line 356, column 942: end tag for "tr" omitted, but OMITTAG NO was specified
that means a <tr> was never started. so it's trying to close atag that was never opened. Like in the example above,you'll note how itstarted and ended it's tags. It should be safe to removethe</tr>, but just in case, you can always omit the tagwith<!--</tr> -->, If no error's show up, then you can justremove the code. First make sure that there indeed was no <tr>needed, or started above, but closed to early.
Same thing goes for <table> and</table> tags. ift hey'renot closed. close them, if they're not opened, test first, then removeif it's sucessfull.
an example of a properly opened and closed table
<!-- Addon to John's vB3 ArcadeV3 hack - created by Natch -->
<if condition="$show['member']">
<!-- flash arcade auto-menu -->
<div class="vbmenu_popup" id="flasharcade_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><tdclass="thead"><ahref="$vboptions[bburl]/arcade.php?$session[sessionurl]"title="$vbphrase[arcade_addon_title]">$vbphrase[arcade_addon_title]</a></td></tr>
$nav_arcade
</table>
</div>
<!-- / flash arcade auto-menu -->
</if>
<!-- Addon to John's vB3 ArcadeV3 hack - created by Natch -->
Guy G
02-14-2005, 02:32 PM
Thanks for your time.
But the problem is that there are so many tags and tables within tables within tables thats its nearly impossible to figure it out...
You know any XHTML editor who would show me nesting problems of tags?
This is the header template, the source for most problems...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.