Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: not2easy
The reason i want to do this is i am validating a page and the background image in the table is causing an error. I thought this was a simple way round it but it appears not?
If the first is not possible can somenone explain the error message below and what i have to do to remove this problem from my life?
ERRROR: there is no attribute "BACKGROUND"
CODE: <td height="329" background="images/bckground.gif" valign="top">
but if you wrap the table in a <div> then apply the background image (and any positioning) to the div, then ensure that your table background color is transparent
would that work?
[edited] tested it now...and it does work
and sorry tedster I didn't see you had posted the same solution ;)
i even made a new page and applied the div tag to a blank table but the background image still didnt work.
I am viewing the page in IE5.5
In my initial post i explained the reason for wanting to do this can anybody suggest how i can make the html validate without placing the background image in the css style sheet?
<td> does support backgrounds
Yes, but there's a difference between what some browsers will support and what's VALID mark-up. Even in HTML 3.2 a background atttribute is not valid for a table or table cell.
how i can make the html validate without placing the background image in the css style sheet
You can't. But you can try it as an inline style, rather than an external .css file.
Have you tried this:
<td height="329" style="background-image:url(images/bckground.gif)">
'background-repeat' takes these values:
repeat ¦ repeat-x ¦ repeat-y ¦ no-repeat ¦ inherit
W3C reference [w3.org]
So that means: