Section 2 - Basics Section 4 - Advanced Fancy Lists Forms Advanced Tables Color tables Background images Nested tables You try it Frames Style Sheets Image Maps Section 5 - Publishing Section 6 - Extras Appendices |
The ability to add color to tables brings up an interesting question. Is it possible to add background images to a table? Absolutely! Adding background images is done in a similar fashion to adding color to the table or adding backgrounds to a page. Also, like color, the picture can either be added to an individual cell or to the entire table.
Now you can see why most tables don't have picture backgrounds. Let's try the same thing with a picture called "smilest2.gif" instead.
That's a trifle bit better. If you use a picture as the background of a table, it needs to be subtle so that the text shows up on top of it. You can also make this same table without a border:
Individual cells can also have backgrounds. To do this, you will modify the <td> to read <td background="image.gif"> or <td background="image.jpg"> Here's an example of this in action. In one cell of this table we'll use "smilest2.gif" and in another an image called "underwatert.jpg."
And once again, if you really have to, these can be combined. Let's see the table above with a table background called "cloth119.jpg."
If you know the exact dimensions of a picture, this allows you to frame the picture within a table and put words over it. Let's look closer at "underwatert.jpg" and it's size. This picture is 144 pixels wide and 107 pixels high. What if we put this in a table with a border of 1 and put a link over it AND a picture over it? Here's what you see:
A reminder about pictures - make sure that the picture tiles correctly and the picture is the right colors and shades to be used as a background. The same rules apply to tables as they do to pages. |