deadlock Message Board
[ August Full List | Reply ]

Controlling Table Cell Colors And Backgrounds
From MacMatŠ on 1 Sept '99
replying to Netscape(nesting tables and background images) posted by Jay Browne

I think I understand more or less what you mean about the problem, but what is your intention exactly? What do you want to happen? At any rate, I think this will help you solve your problem. Just copy and paste this HTML document and take a look.

<HTML>

<BODY BGCOLOR="white">

<TABLE BORDER=0 CELLPADDING=20 CELLSPACING=20>
<TR>
<TD BACKGROUND="image.jpg">

<TABLE BORDER=0 CELLPADDING=10 CELLSPACING=10>
<TR>
<TD BGCOLOR="white" BACKGROUND="">This is a cell using the same background color as the page's main background color (which in this case is white -- assuming that your page's background color is set to white as well). It is not using the background <B>image</B> of the table data (TD) cell containing this particular nested cell.
<P>
However, note that in this table data (TD) cell, the color is <I>specified</I> to be white. It won't automatically adapt the page's background color if you omit the bgcolor attribute here altogether. If you do, instead you will get the background image of the above table data (TD) cell containing this one show through. Note that if you also omit the background="" definition in this table data cell as well (along without bgcolor="white"), Navigator will start a new tile of the image within, but IE will reveal the previous one through as usual.
<P>
The difference between IE and Navigator, as I have found, is that Navigator requires you to specifiy a table data background of nothing (td background="") in order for the table data's color to take precedence (ex. td bgcolor="white").
</TD>
<TD VALIGN="TOP" BGCOLOR="lightgoldenrodyellow" BACKGROUND="">Here is another cell still not using the image background,<BR>
but instead is specified to use a "lightgoldenrodyellow" background color, which indicates that the cell's color can be different from the main page's background color if you wish.
</TD>
</TR>
</TABLE>

</TD>
</TR>
</TABLE>

</BODY>

</HTML>




Reply to this message

Required Details
Your name:
Subject:

Optional Details
Home page title:
Home page URL:
Email:
(if you'd like to receive
automatic replies by email)

Your Message