"Karl Groves" <> wrote:
>> I have a table (it's a catalogue) with small images in each cell.
>> How do I slap a 'sold' label over the image? Of course, I could just
>> substitute a 'sold' image in the cell, but I'd rather let the sold
>> item show, too.
>
> Set the product image as the cell's background, and put your "sold"
> image over it.
That's probably one way (didn't try, but I don't see any reason why it
wouldn't work).
Another approach: use markup like
<td class="sold"><img src="demo.gif" alt="demo"> <span>sold</span></td>
and use CSS to make the text "sold" overprint the image, by positioning
them into the same place and assigning a higher z-index value to the span
element, e.g.
td.sold { position: relative; height: 100px; }
td.sold span { position: absolute;
color: red;
font-weight: bold;
font-size: 150%;
background: transparent;
z-index: 200; }
td.sold img { position: absolute; z-index: 100; }
If the images are very different, then the idea of overprinting with a
transparent background (which you could implement in Karl's approach too,
by making areas of the image transparent) is not suitable, since no text
color can be legible against all backgrounds. But when feasible, the
approach lets the image shine through.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring:
http://www.cs.tut.fi/~jkorpela/www.html