Table Backgrounds: Setting Individual CellsIn this page we'll look at two techniques for setting the background images of table cells. Which technique you use depends on which is more convenient to your situation.
In the first example, we'll assume that you want all the
<STYLE TYPE="text/css"> <!-- .deepsea TH, .deepseacell { background-image:url('deepsea.gif'); background-color:blue; color:white; font-family:sans-serif; font-weight:700; } --> </STYLE>
Now we apply the rules to a table by setting the table to the
<TABLE CELLPADDING=5 CLASS="deepsea"> <TR> <TH>Operator</TH> <TD>Starflower</TD> <TD>Melody</TD> </TR> <TR> <TH>Ext</TH> <TD>8172</TD> <TD>5673</TD> </TR> <TR> <TH>City</TH> <TD>San Francisco</TD> <TD>San Pedro</TD> </TR> </TABLE> which gives us this table:
Now suppose that you can't set the general rule that all
<TABLE CELLPADDING=5> <TR> <TD>turtles</TD> <TD CLASS="deepseacell">starflowers</TD> <TD>peaches</TD> </TR> <TR> <TD CLASS="deepseacell">cats</TD> <TD>patchouli</TD> <TD>grapefruit</TD> </TR> </TABLE> which gives us
|