Computers > Web Design



Add a Background Image to a Table





Described below are the TD and CSS approaches for adding a background image to a table in HTML:

The TD background method is shown below


<td background="yourbackground_image.gif">

Background applied to left-side column only in an actual table:

<table>
<tr>
<td background="yourbackground_image.gif">
Left-Side Column
</td>
<td>
Right-Side Column
</td>
</tr>
</table>


CSS Table Background Image

<table>
<tr>
<td style="background-image: url(yourbackground_image.gif); background-repeat: no-repeat;">
Left-Side Column
</td>
<td>
Right-Side Column
</td>
</tr>
</table>