Re: Netscape messes up background images in tables

by "Donna M Smillie" <dms(at)zetnet.co.uk>

 Date:  Thu, 14 Oct 1999 14:07:25 +0100
 To:  "Martin Eager" <martin(at)runic.com>,
<hwg-basics(at)hwg.org>
 References:  runic
  todo: View Thread, Original
Hi Martin

----- Original Message -----
From: Martin Eager <martin(at)runic.com>

> I'd be grateful if folks could look at this URL for me and explain why
> Netscape is screwing up so badly with the image I'm trying to use for
> the table background. Please view in IE4/5 first to see how it SHOULD
> look, then in Netscape 4+
>
> http://www.runic.com/citybug/micro.html
[snipped]

Netscape took the concept of "inheritance" a bit too far when it came to
tables and background images, I'm afraid!  :-)  As you've discovered, it
loads the image into every "child" table cell.

The good news, though, is that there's a solution which, to the best of my
knowledge, doesn't cause any problems for any other browser.  Simply add
BACKGROUND="" to the TABLE tags for any nested tables (nested inside the
table carrying the main background image, that is).  Essentially, that
switches the background property off in the nested table, preventing it
from inheriting the image from the table that contains it, but allowing the
image to show through.

I've used this before, and just double checked it again using NN4.6, and it
works.

Alternatively, if you work with a single table, with the background image
specified in the TABLE tag, you would add BACKGROUND="" to every TD tag to
prevent the image from loading into every cell, and allow the image to be
displayed as a single background for the table.

HTH!

Regards,
Donna
--
dms(at)zetnet.co.uk
Different Worlds:  http://www.users.zetnet.co.uk/dms/
Pictures of the Past, The Leslie Smith Family,
An Introduction to HTML, Copyright Considerations
Calendar Wallpapers, Online WW1 Bookshop

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA