Simple layering of items in a table cell?

P

Paul W

Hi, Within a table cell I want to have an image (centered) in the
background, with some text in front of it. Sounds simple, but I can't get
it.

The following doesn't work. What should it look like?

Thanks, Paul.
 
R

Rick Budde

Perhaps you should try using a imaging program (Photoshop
Elements, etc.) to accomplish this.
 
P

Paul W

Well the text will actually be dynamic, so combining the text and image into
a single image beforehand is not really an option. Any ideas out there...
 
M

Murray

Egads! So many errors - so little code. 8)

1. Never use a negative z-index. While not illegal, it's not well
supported; although IE does, others don't.
2. While this div is *not* positioned, the use of a z-index implies it is.
You should know that it is a bad practice to put any absolutely positioned
element into a table cell.
3. "z_index"? Minus 33? YIKES!

Well, that's really only two errors (and maybe only one)!

Make your code like this -

<td background="arrow.jpg">my Front Text here</td>

But - you will have to figure out a way to 'prop' that cell open (perhaps by
'shimming' an adjacent cell/column to the desired height/width of the
background image), otherwise it will collapse around the content.
 
Top