JunChen::Wish Room 1906

Promoting Usability, Accessibility and Web Standards...

上一篇:Blogging can be profitable, apparently… | 返回首页 | 下一篇:一个陌生女人的来信

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

相关文章

引用 Trackback

本文引用地址:http://www.junchenwu.com/cgi-bin/mt-tb.cgi/51.

评论

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 :(

john 说:

HI,Do u have interest in communicate with each other to discuss some problem...Pls get my MSN:topoot@hotmail.com.

发表评论