View Full Version : Table background image problem.

14th March 2006, 7:18 PM
This is either the wrong forum/belongs in a sticky, or this will fly over everyone's heads. I know it flies right over mine. I'm having an issue with regards to my table background images being W3C XHTML 1.0 compliant. Apparently,
<td background="/image.png"> is non-compliant.

Here's where the error is;

style="text-align: right; width: 99px; height: 13px;"

And this (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.freewebs.com%2Fmadlymec hanical%2Fddd%2Findex.html&charset=%28detect+automatically%29&doctype=HTML+4.01+Transitional) is the error message for the validation (BTW, don't mind the site it's sort of intentionally generic, I seriously hate using the three column layout and I'm actually about to abandon this layout but now this td background issue is bothering me). Also, as you can see, I use the background attribute multiple times, so if it requires CSS which I've never really done before, I have a feeling I will get confused.

Any assistance is appreciated, and sorry if it's the wrong forum or if this belongs in a sticky. :E

Virtual Headache
14th March 2006, 7:29 PM
Try this code:

<td style="text-align: right; width: 99px; height: 13px; background-image:url(http://img61.imageshack.us/img61/3383/stick3gw.png)" colspan="4">

14th March 2006, 7:36 PM
Yes! That solves it, and it'll be much easier to fix all the other background images in this format than to use a whole CSS sheet like the other sites were recommending.

Thanks x1000.

16th March 2006, 4:06 AM
On an unrelated note, try and locally host your images.

Imageshack isn't the *most* reliable.