Re: background image and tables

by Tamara Abbey <tamara(at)abbeyink.com>

 Date:  Tue, 27 Feb 2001 18:39:49 -0600
 To:  "Shelley Watson" <shelleyw(at)home.com>,
<hwg-basics(at)hwg.org>
 In-Reply-To:  home
  todo: View Thread, Original
At 02:18 PM 2/27/01 -0800, Shelley Watson wrote:

>Dear folks
>
>         I'm trying to construct a page where I have a table with a width 
> of 650
>pixels centered on the screen.  I wanted to be able to use a background
>image for this main table which would be "over" a background color (i.e.
>body bgcolor="ffffff").  The idea is to have a centered table that is
>visible without horizontal scrolling on a background of contrasting color
>with the background color area being more or less visible depending on
>screen resolution.  There is no background attribute for tables and although
>one of my resource books shows that you can do this in the table cell it
>doesn't work for Netscape (fine for MSIE 5.1, tho :) )

Yes, there is, Shelley, if you use CSS -- define the background for the 
table in the style sheet by using classes.

.main { background-image : url (background.gif) white }

Then, use <table class="main"> on the main page and it /should/ do the 
background on NN, NS, and IE.

I read an article somewhere (evolt maybe?) where they were talking about 
NN's preferred background images -- if I remember correctly -- and I 
probably don't -- I *think* it concluded NN would rather have a transparent 
gif for a table background than a jpg.

If you get a chance to play with it, let me know would you?

8-)


>         Am I barking up the wrong tree here or is there a way to use 
> background
>images in other than the body tag?  That is, a background image that tiles
>:) rather than just loading up a rather large image.

Well, no, it's the right tree, but without CSS, you might be in the wrong 
forest.

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