position: relative

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

position: relative

Post by alex.barylski »

I have an SPAN which follows immediately after an IMG tag...

Both are inside a TD

What I want to do is display the SPAN over the IMAGE

I've tried using position: relative inside the TD container and setting the SPAN as position: absolute

And in IE...both the SPAN and IMG are placed at X = Y = 0 relative to the TD - the desired result!!!

However in FF (of course) the SPAN is rendered atthe top of the browser window...

WTF???

Anyone know a way I can get both rendering the way I expected it to??? But in FF????

Thanks :)
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post by foobar »

For the span:

Code: Select all

z-index: 100; /* any value above the z-index for your image, default 0 */
Post Reply