Web advice needed please!

A forum for, well, anything really.
Gripes, moans, ideas or just general chit chat. EXCEPT SPAM!!! - Don't just register to post here - IT WILL GET DELETED!!!
Post Reply
User avatar
fredlongworthhighschool
Mega Advanced
Mega Advanced
Posts: 362
Joined: Fri Jun 27, 2003 11:34 am
Location: Manchester, England.
Contact:

Web advice needed please!

Post by fredlongworthhighschool »

Not a Milonic issue but seeing as how the support on here is so good I thought I'd thrown in a little issue I have.

What with all these new rules from the UK Disability Rights Commission hassling web designers to make their sites fully compliant, we thought we'd couple this in with a revamp of our website.

But there is one bit of code which is coming up invalid. The error is:
Line 42, column 29: there is no attribute "BACKGROUND" (explain...).
<TD background="../images/g_04.gif"></TD>

This image is the left hand side of a box. The odd thing is that the right hand side parses ok. The code is as follows:

Code: Select all

  40: <!-- Left & Right Edge Bars -->
  41:             <TR>
  42:               <TD background="../images/g_04.gif"></TD>
  43:               <TD bgColor="#FFFFFF">
  44: 			  <div align="center">
  45:                 <p><img src="images/banners/FLHS_title.jpg" alt="FLHS title" width="600" height="128"></p>
  46:                 <p><img src="images/schoolpic/artimp404.gif" alt="School Photo" width="405" height="223" border="0"></p>
  47:                 <p><img src="images/banners/shapingfuture.jpg" alt="Shaping_Future logo" width="388" height="42" hspace=0 border=0 align=middle class=""> </p>
  48:               </div>
  49: 			  </TD>
  50:               <TD background="../images/g_06.gif"></TD>
  51:             </TR>
http://www.flhs.wigan.sch.uk/test
Andy Davis
Web Designer & Smartboard Manager

Fred Longworth High School, Manchester, England.
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Andy,

Not 100% sure, but background may be a depreciated attribute in HTML 4.0, in favor of controlling such things through CSS. Are you specifying a doctype?... that might make a difference.

Cheers,

Kevin
waitman
Beginner
Beginner
Posts: 5
Joined: Thu May 13, 2004 8:22 am
Location: Buena Park
Contact:

yup, css will do

Post by waitman »

Hello

Yes, you should look into CSS. Below are two example that produce similar results, the first table without CSS and the second with CSS. http://validator.w3.org/ gripes about the background attribute on the <td>, because it is indeed deprecated. I didn't try but you could probably set your DOCTYPE to something like 3.2, and the warning would dissapear.

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.tdbg {
background-image: url(http://www.flhs.wigan.sch.uk/test/images/g_06.gif);
background-repeat: repeat-y;
}
</style>
</head>

<body>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="http://www.flhs.wigan.sch.uk/test/images/g_06.gif" height="150"><img src="http://www.flhs.wigan.sch.uk/test/images/g_06.gif" width="25" height="3" border="0" alt="nothing"></td>
</tr>
</table>


<br clear="all">

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tdbg" width="25" height="150"><img src="http://www.flhs.wigan.sch.uk/test/images/g_06.gif" width="25" height="3" border="0" alt="nothing"></td>
</tr>
</table>
</body>
</html>
Best Regards,
Waitman Gobble
http://emkdesign.com/
User avatar
fredlongworthhighschool
Mega Advanced
Mega Advanced
Posts: 362
Joined: Fri Jun 27, 2003 11:34 am
Location: Manchester, England.
Contact:

Post by fredlongworthhighschool »

Just a little update:

I've since spent a little time studying CSS boxes and you guys are right, it's far superior.


I've not had time to do much since getting it working, but my results have been uploaded http://www.flhs.org.uk/test

Thanks again,

Andy
Andy Davis
Web Designer & Smartboard Manager

Fred Longworth High School, Manchester, England.
Post Reply