|
HTML Tip:
More About Table Background Images
by Larisa Thomason,
Senior Web Analyst,
NetMechanic, Inc.
Last month, we discussed three different ways to include a background image in your tables. However, David Bangs of Issaquah, WA has an even better solution.
Attach the background image to a table and then nest an inner table that contains your text or other information. Netscape 4.x and below lets the inner table inherit the background image from the outer table and display the image in every cell. You can avoid this bug by simply including BACKGROUND=" " in the inner <TABLE> tag.
HTML code outline to nest a sample table with 3 rows and 2 columns would be:
<TABLE BORDER="0"
BACKGROUND="yourPic.jpg">
<TR>
<TD>
<TABLE BORDER="0"
BACKGROUND="">
<TR>
<TD> </TD>
<TD> </TD>
</TR>
<TR>
<TD> </TD>
<TD> </TD>
</TR>
<TR>
<TD> </TD>
<TD> </TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
|
The results will display perfectly in IE4 and later, Netscape 4.x and Netscape 6 Preview. You can use any file name, path, or image format.
Thanks to David for that great tip! To our other subscribers: don't be shy. If you find a better way to implement any of our Webmaster tips, please let us know.
|