PDA

View Full Version : Valid code.


CAMS
03-05-2006, 01:51 PM
Hey lads,

got a problem

recoded my header and footer on my styles to be valid.. one problem tho.. as soon as ther placed into vb they dont validate.. but do on ther own without all the vb stuff included..

so can only think that its vb not validating?

only down to 5 errors :(


http://www.2evolve.org/vb/memberlist.php?styleid=11

is the link to try validate..

any ideas? or is it down to vb and not my code?

Princeton
03-05-2006, 03:45 PM
Can you post the code that you created?

On the above page...
you have duplicate <body> tags.
you also have extra </td></tr></table> ... I'm not sure if you need them.

CAMS
03-05-2006, 04:02 PM
Can you post the code that you created?

On the above page...
you have duplicate <body> tags.
you also have extra </td></tr></table> ... I'm not sure if you need them.


the extra </tr> etc is vbulletins code :S didnt find any in the header code but the other body tag is mine.. wasnt sure wer to put the preload stuff in the <body> tag that i have in the header...

tryed removing the body tag from forumhome but unsure if this removes it from every part of vb so the body tag in the header is the only one that will be ther...

heres the header code

that validates (or does when in a normal page and not vb)


<body onload="MM_preloadImages('2Evolve/images/2e_juicerollOVER_05.gif','2Evolve/images/2e_juicerollOVER_06.gif','2Evolve/images/2e_juicerollOVER_07.gif','2Evolve/images/2e_juicerollOVER_08.gif','2Evolve/images/2e_juicerollOVER_09.gif','2Evolve/images/2e_juicerollOVER_10.gif','2Evolve/images/2e_juicerollOVER_11.gif','2Evolve/images/2e_juicerollOVER_12.gif','2Evolve/images/2e_juicerollOVER_13.gif','2Evolve/images/2e_juicerollOVER_14.gif')">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="590" height="167" valign="top"><table width="100" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="188" height="167" valign="top"><img src="2Evolve/images/2e_juice_01.gif" alt="header" width="188" height="167" /></td>
<td width="402" valign="top"><img src="2Evolve/images/2e_juice_02.gif" alt="header2" width="402" height="167" /></td>
</tr>

</table></td>
<td width="393" valign="top"><table width="393" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td height="148" colspan="3" valign="top"><img src="2Evolve/images/2e_juice_04.gif" alt="header3" width="393" height="148" /></td>
</tr>
<tr>
<td width="134" height="19" valign="top"><a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','2Evolve/images/2e_juicerollOVER_05.gif',1)"><img src="2Evolve/images/2e_juice_05.gif" alt="Community Forums" name="Image4" width="134" height="19" border="0" id="Image4" /></a></td>
<td width="128" valign="top"><a href="view.php?pg=customstyles" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','2Evolve/images/2e_juicerollOVER_06.gif',1)"><img src="2Evolve/images/2e_juice_06.gif" alt="View Vbulletin Styles" name="Image5" width="128" height="19" border="0" id="Image5" /></a></td>
<td width="131" valign="top"><a href="forumdisplay.php?f=4" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','2Evolve/images/2e_juicerollOVER_07.gif',1)"><img src="2Evolve/images/2e_juice_07.gif" alt="Pre-Sale Questions and Help" name="Image6" width="131" height="19" border="0" id="Image6" /></a></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="590" height="34" valign="top"><table width="100" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="73" height="34" valign="top"><a href="main.php" target="_self" onmouseover="MM_swapImage('Image7','','2Evolve/images/2e_juicerollOVER_08.gif',1)" onmouseout="MM_swapImgRestore()"><img src="2Evolve/images/2e_juice_08.gif" alt="FrontPage" name="Image7" width="73" height="34" border="0" id="Image7" /></a></td>
<td width="61" valign="top"><a href="usercp.php" target="_self" onmouseover="MM_swapImage('Image8','','2Evolve/images/2e_juicerollOVER_09.gif',1)" onmouseout="MM_swapImgRestore()"><img src="2Evolve/images/2e_juice_09.gif" alt="User Control Panel" name="Image8" width="61" height="34" border="0" id="Image8" /></a></td>
<td width="91" valign="top"><a href="memberlist.php" target="_self" onmouseover="MM_swapImage('Image9','','2Evolve/images/2e_juicerollOVER_10.gif',1)" onmouseout="MM_swapImgRestore()"><img src="2Evolve/images/2e_juice_10.gif" alt="View Member List" name="Image9" width="91" height="34" border="0" id="Image9" /></a></td>
<td width="97" valign="top" id="navbar_search"><a href="search.php$session[sessionurl_q]" target="_self" onmouseover="MM_swapImage('Image10','','2Evolve/images/2e_juicerollOVER_11.gif',1)" onmouseout="MM_swapImgRestore()"><img src="2Evolve/images/2e_juice_11.gif" alt="Search Forums" name="Image10" width="97" height="34" border="0" id="Image10" /></a>
<script type="text/javascript"> vbmenu_register("navbar_search", true); </script></td>
<td width="76" valign="top"id="usercptools"><a href="$show[nojs_link]#usercptools" target="_self" onmouseover="MM_swapImage('Image11','','2Evolve/images/2e_juicerollOVER_12.gif',1)" onmouseout="MM_swapImgRestore()"><img src="2Evolve/images/2e_juice_12.gif" alt="QuickLinks" name="Image11" width="76" height="34" border="0" id="Image11" /></a> <script type="text/javascript"> vbmenu_register("usercptools", true); </script></td>
<td width="68" valign="top"><a href="faq.php" target="_self" onmouseover="MM_swapImage('Image12','','2Evolve/images/2e_juicerollOVER_13.gif',1)" onmouseout="MM_swapImgRestore()"><img src="2Evolve/images/2e_juice_13.gif" alt="View Faq?" name="Image12" width="68" height="34" border="0" id="Image12" /></a></td>
<td width="124" valign="top"><a href="register.php" target="_self" onmouseover="MM_swapImage('Image13','','2Evolve/images/2e_juicerollOVER_14.gif',1)" onmouseout="MM_swapImgRestore()"><img src="2Evolve/images/2e_juice_14.gif" alt="Join The Community!" name="Image13" width="124" height="34" border="0" id="Image13" /></a></td>
</tr>

</table></td>
<td width="190"></td>
</tr>
</table>

Princeton
03-05-2006, 04:18 PM
the code validates but you may want to check what you have edited on that page (perhaps a template edit you did in the past)...
something has been changed (vb default templates validate on that page)

TIPS
-- you will not be able to use the additional <body> tag ... you will have to edit the <body> tag found on the template

-- never repeat id attributes (eg. id="pagenav_menu") ... id's are suppose to be unique ... there's a couple duplicates on the page

-- alt attributes should be left empty if the image has no relevance to the reader; a good example of this would be corner images-just leave it as alt=""; on the above code, the only images that should have alt values is your logo and buttons

good job :up:

CAMS
03-05-2006, 04:30 PM
yeah but if i leave no alts it wont validate lol :( thats some of the errors it was given me was that the images had no alts :S

the page has never been chanegd bud.. wat ever its got was how it was :S only edits to template in that style is the header and navbar .. mm wait a sec ther u go mite be nav bar template lol ill have a look

cheers for help

Princeton
03-05-2006, 04:44 PM
yeah but if i leave no alts it wont validate lol thats some of the errors it was given me was that the images had no alts :S
you should always have them; but, you can leave the alt attribute empty ie. alt=""

CAMS
03-05-2006, 04:49 PM
ah k sound ill remove them didnt relise they can me empty