Don't do it the intuitive way...
<tr style="background: url(/images/tr-background.gif) no-repeat 0 0;">
<td>Row 1</td>
<td>Row 2</td>
<td>Row 3</td>
</tr>
</table>
...because it doesn't work in IE6 or Safari, even if you set the <td> background element to 'transparent' or 'none'.
But you can still make it happen with just the one image:
<tr>
<td style="background: url(/images/tr-background.gif) no-repeat 0 0;">Row 1</td>
<td style="background: url(/images/tr-background.gif) no-repeat 50% 0;">Row 2</td>
<td style="background: url(/images/tr-background.gif) no-repeat 100% 0;">Row 3</td>
</tr>
</table>
You're just altering the background-position of the image, so that what should be on the left goes on the left (at 0), the middle part goes to the middle (50% horizontally), and the last part goes at the end (100%). Remember that values in the background-position element are ordered horizontal, then vertical, unlike the margin and padding elements.
And, of course, you'll want to separate presentation from content by putting the CSS elsewhere and classing the td's.






Posted by Jamie Fehr on March 01, 2007
Came across this same problem, I haven't yet figured out how to make safari play nice, but Internet Explorer will respect your Background Image declaration if you add
position: relative;after the image declaration. Hopefully I'll get the safari thing figured out before long.