ev5unleash Posted April 10, 2009 Share Posted April 10, 2009 I'm a little stumped by why my site is not being validated correctly. Could someone point me in the right direction to what I should fix to make my site Validated by W3C's Validation? http://ev5unleash.dnsalias.org:85/websites/biosite/layout.html. http://validator.w3.org/check?uri=http://ev5unleash.dnsalias.org:85/websites/biosite/layout.html&charset=(detect+automatically)&doctype=Inline&group=0 Thanks, Evan <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript"> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } function MM_validateForm() { //v4.0 if (document.getElementById){ var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } } //--> </script> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body onload="MM_preloadImages('/websites/biologywebsite/images/links/homeovr.png','/websites/biologywebsite/images/links/lessonsovr.png','/websites/biologywebsite/images/links/quizovr.png','/websites/biologywebsite/images/links/aboutovr.png')"> <table width="921" height="1096" border="0" align="center" background="images/homepage.png"> <tr> <td width="150" rowspan="2" align="center" valign="top"> </td> <td height="15" colspan="2" align="right" valign="top"> </td> </tr> <tr> <td width="736" height="100" align="right" valign="top"><form id="login" name="login" method="post" action="login.php"> <label><span class="textbox">Username </span> <input name="Username" type="text" class="textbox" id="Username" /> <span class="textbox">Password</span> <input name="Password" type="password" class="textbox" id="Password" /> <input name="loginbutton" type="submit" class="textbox" id="loginbutton" onclick="MM_validateForm('Username','','R','Password','','R');return document.MM_returnValue" value="Login" /> </label> </form></td> <td width="21" align="right" valign="top"> </td> </tr> <tr> <td width="150" height="28" align="center" valign="top"><a href="#"><img src="images/links/home.png" alt="Home" name="Image1" width="130" height="28" id="Image1" onmouseover="MM_swapImage('Image1','','/websites/biologywebsite/images/links/homeovr.png',1)" onmouseout="MM_swapImgRestore()" /></a></td> <td colspan="2" rowspan="6"> </td> </tr> <tr> <td height="25" align="center" valign="top"><a href="#"><img src="images/links/lessons.png" alt="Lessons" width="130" height="28" id="Image2" onmouseover="MM_swapImage('Image2','','/websites/biologywebsite/images/links/lessonsovr.png',1)" onmouseout="MM_swapImgRestore()" /></a></td> </tr> <tr> <td height="25" align="center" valign="top"><a href="#"><img src="images/links/quiz.png" alt="Quiz's" width="130" height="25" id="Image3" onmouseover="MM_swapImage('Image3','','/websites/biologywebsite/images/links/quizovr.png',1)" onmouseout="MM_swapImgRestore()" /></a></td> </tr> <tr> <td height="25" align="center" valign="top"><a href="#"><img src="images/links/about.png" alt="About" width="130" height="28" id="Image4" onmouseover="MM_swapImage('Image4','','/websites/biologywebsite/images/links/aboutovr.png',1)" onmouseout="MM_swapImgRestore()" /></a></td> </tr> <tr> <td height="712" align="center" valign="top"> </td> </tr> <tr> <td align="center" valign="top"><a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="/websites/biosite/images/w3c.png" width="115" height="80" alt="W3C Valid CSS" /></a></td> </tr> </table> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/153552-solved-xhtml-corrrections-for-proper-validation/ Share on other sites More sharing options...
jackpf Posted April 10, 2009 Share Posted April 10, 2009 You need to use css to define height and background attributes. Quote Link to comment https://forums.phpfreaks.com/topic/153552-solved-xhtml-corrrections-for-proper-validation/#findComment-806849 Share on other sites More sharing options...
Maq Posted April 10, 2009 Share Posted April 10, 2009 They provide a "How to fix" section for each error, have you read that? Quote Link to comment https://forums.phpfreaks.com/topic/153552-solved-xhtml-corrrections-for-proper-validation/#findComment-806850 Share on other sites More sharing options...
ev5unleash Posted April 10, 2009 Author Share Posted April 10, 2009 I need to use CSS? Because I need the table background to be specified there and not in the CSS. Is there any work around that I can do to make it valid other than dealing with the CSS? Quote Link to comment https://forums.phpfreaks.com/topic/153552-solved-xhtml-corrrections-for-proper-validation/#findComment-806872 Share on other sites More sharing options...
jackpf Posted April 10, 2009 Share Posted April 10, 2009 Yeah. Quote from validator.w3.org this is usually fixed by using CSS to achieve the desired effect instead That's basically what I stated above Quote Link to comment https://forums.phpfreaks.com/topic/153552-solved-xhtml-corrrections-for-proper-validation/#findComment-806880 Share on other sites More sharing options...
ev5unleash Posted April 10, 2009 Author Share Posted April 10, 2009 Alright, that solved my problem. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/153552-solved-xhtml-corrrections-for-proper-validation/#findComment-806885 Share on other sites More sharing options...
jackpf Posted April 10, 2009 Share Posted April 10, 2009 Jolly good. Quote Link to comment https://forums.phpfreaks.com/topic/153552-solved-xhtml-corrrections-for-proper-validation/#findComment-806888 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.