PDA

View Full Version : W3C Validation


Wilfred1
10-23-2010, 08:17 AM
I use a menu system on my vb4 forums that uses a script for the main menu items and sub menu items similar to the vb menu - when you click on a main menu item the sub menu items appear below it.

The code is similar to:
<table id="menu" class="tabmenu" cellspacing="0" cellpadding="0">
<tr>
<td><a id="link" href="../index.php" rel="sb1">Home</a></td>
<td><a id="link" href="../test/" rel="sb2">Test</a></td>
</tr>
</table>

<div class="submenu ieclass">
<div id="sb1" class="subcontent">
<a href="../pages/about.php">About This Site</a>
<a href="{vb:raw vboptions.contactuslink}" rel="nofollow" accesskey="9">Contact Us</a>
</div>

<div id="sb2" class="subcontent">
<a href="../test/test1.php">Test 1</a>
<a href="../test/test2.php">Test 2</a>
</div>
</div>

But when I validate it I get errors like:

https://vborg.vbsupport.ru/external/2010/10/16.png Line 260, Column 14: ID "link" already defined <td><a id="link" href="../aircraft/" rel="sb2">Aircraft</a></td> ✉ (http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.recreationalfly ing.net%2Fforum%2F;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).

https://vborg.vbsupport.ru/external/2010/10/17.png Line 259, Column 14: ID "link" first defined here <td><a id="link" href="../index.php" rel="sb1">Home</a></td>Any ideas how I can fix this...thanks if you can help!