W3C home > Mailing lists > Public > www-validator@w3.org > March 2005

Re: <td background="images/bg.jpg">

From: David Dorward <david@dorward.me.uk>
Date: Tue, 15 Mar 2005 18:40:34 +0000
To: Graham <zen37549@zen.co.uk>
Cc: www-validator@w3.org
Message-ID: <20050315184034.GA19040@us-lot.org>

On Tue, Mar 15, 2005 at 05:28:45PM +0000, Graham wrote:
> 
> style="background-image:images/bg.jpg;"

Actually the syntax is: background-image: url(images/bg.jpg).
 
> But an external stylesheet is the recommended method as it more fully 
> seperates the presentation from the structure and content which results 
> in better markup.

Indeed

> The problem with an external stylesheet is that it displays the
> background on some pages but not on others

That is most likely due to the property either being overridden for
those pages, or for those pages not including any element which
matches the selector. (Another possibility is that the website is
inconsistent with its Doctype causing some pages to trigger standards
mode while others don't, and the style sheet being served with the
wrong Content-type header). Of course this is mearly guesswork as I
don't see a URL, but there is no reason for _random_ working/not
working.

-- 
David Dorward                                      http://dorward.me.uk
Received on Tuesday, 15 March 2005 18:40:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:18 GMT