Chapter 9: Tables
index | previous

Using a Background Image

I am not very fond of background images, either in cells, tables, or an entire page (see page 99). If you do decide to use one, make sure it contrasts enough with the cell’s contents so that the contents are legible.

To use a background image for a cell:

Within the TD tag, type BACKGROUND= "image.gif" where image.gif is the URL of the image that you wish to use as the backdrop for your cell.

To use a background image for the entire table:

Within the TABLE tag, type BACKGROUND= "image.gif" where image.gif is the URL of the image that you wish to use as the backdrop for your table.

Tips

  • You can add both a background image and a background color to a cell. The background color will both display before the image and then continue to shine through the transparent parts of the image, if there are any.
  • If you set a background image for the whole table, beware! Explorer uses one image for the background while Netscape copies the whole image into each cell individually.
  • In Explorer, the BGCOLOR attribute overrides the background image—except in the cell spacing area (see page 155). If you view the same page with Netscape, you’ll find that background colors disappear completely if you specify a background image. Can we say “consensus” please?
Figure 9.34 Add the BACKGROUND tag to the cell that you want to fill with an image.
Figure 9.35 This fish image almost works design-wise because it is so dark that the white links show up quite nicely. Still, I think it’s a little busy—like most background images.
previous