1 reply [Last post]
markmccoid
Offline
newbie
Last seen: 15 years 28 weeks ago
Joined: 2004-05-29
Posts: 1
Points: 0

Hi,

I'm new to CSS, but I think this is a compatability issue, since it is working in Netscape.

I have a content div with a z-index of 3 and within the div I have an image foated left. This shows up fine in Netscape, but in IE 6 it is behind the content div.

Does this ring any bells for anyone?

The page is at http://www.mccoidco.com/blue.htm.

Any suggestions are greatly appreciated.

Thanks,

Mark

co2
co2's picture
Offline
Leader
UK
Last seen: 11 years 35 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

Floated image in IE behind everything

You need to give the image a position declaration also. Using z-index will only work when the element is taken out of the document flow, and into a layer-like environment. Use:

img
{
position: relative;
z-index:3;
}

... However, I would suggest adding a class/id to the image in question, since adding position: relative to the above style will add position: relative; to all images (since you've used the img universal selector).

Smile

The next sentence is true. The previous sentence is false. Discuss...