W3C home > Mailing lists > Public > www-validator@w3.org > October 2007

Re: [VE][108] Howto do table - background=picture.gif ?

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sat, 6 Oct 2007 18:36:26 +0300
Message-ID: <009801c8082e$a917b480$0300000a@DOCENDO>
To: "Bengt Samuelsson" <bengt@sm7jqb.se>, <www-validator@w3.org>

Bengt Samuelsson wrote:

> /Line 25, Column 19/: there is no attribute "BACKGROUND".

Indeed. By HTML syntax, the background attribute is allowed for the body 
element only.

> I have just one error left and I have no idea, so far, how to fix it.
> I want to keep the disign.

The ways of replacing presentational nonstandard attributes is a general 
design question, not really specific to markup validation, but see a summary 
of converting from presentational HTML to CSS:

> <table align="left" cellpadding=20 cellspacing=0 width=860 border=0>
> <tr><td *background="bild/bg-spiral.gif"*>
>     <table align="center" cellpadding=0 cellspacing=0 width=810
>     border=0> <tr><td>
> [... Everything on the sajt komes here...]
>     </td></tr></table>
> </td></tr></table>

This sounds like an excessively complex way of doing layout, as compared 
with the use of CSS for a single div element, but if you just want to keep 
the design and make it validate, replace the background="..." attribute by
style="background-image: url(bild/bg-spiral.gif)"

Jukka K. Korpela ("Yucca")
Received on Saturday, 6 October 2007 15:34:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:04 UTC