Using z-index in firefox
发表于 2005年02月26日 10:43 PM @ 分类:Web Standards
I happened to meet the problem today while designing pages.
e.g.
img.test{}{
position: absolute;
Z-index: -1
}

It works great in IE but the image doesn't show in firefox.
Here's the problem: Firefox. It doesn't deal with z-index properly. As far as it is concerned the body's background is z-index: 0; and anything then that is negative then places it 'below' the body's background properties, in affect hiding it.
Give this a z-index of 1 and the next object a z-index of 2...and be sure you're absolutely positioning both objects.
P.S. do not forget the !DOCTYPE

评论
mine is, the logo should not be absolute because it will not display properly as what I defined in the CSS to float left. Is it possible that one image is not absolute and the other is absolute? I tried to set the background to z-index 1 and the logo to 2. But it doesn't work on both browsers :(
2007年05月18日 20:29
HI,Do u have interest in communicate with each other to discuss some problem...Pls get my MSN:topoot@hotmail.com.
2007年09月23日 23:28