Text over image problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am displaying a small image in a table data cell of an HTML table and I
want to display between 1 and 3 letters over the center of this image. Any
clues on the CSS needed to achieve this?

Re: Text over image problem

2012-10-18 9:52, Graham S wrote:

Quoted text here. Click to load it

Wrap the text in a <span> element and both it and the <img> element in a
<div> element. Set position: relative on the <div> element and then
position the <img> and <span> absolutely inside it. It is simplest,
though not most flexible, to set the width and height of <div> the same
as those of the image and set display: block on <img> (to avoid extra

Yucca, http://www.cs.tut.fi/~jkorpela /

Site Timeline