Chapter 37. Using Background Images in Table Cells
You probably know that you can place an image inside a table cell, like this:
<td><img src="mercury.jpg" width="200" height="200"></td>
You probably also know that you can set the background color of a table cell, like this:
<td bgcolor="#FF0000">Behold, the planet Mercury</td>
But did you also know that you can use an image as the background of a table cell? It works like this:
<td background="mercury.jpg" width="200" height="200">Behold, the planet Mercury</td>
Doing it like this allows you to superimpose HTML content, as Figure 37.1 shows.
Figure 37.1. When you use an image as the background of a table cell, you can superimpose HTML content.
TIPThe width and ... |
Get Web Design Garage now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.