开发者

Why is z-index not working for this webpage?

Open up http://irule.at/quovadis, and it will show you a regular theme. The problem is that the div photos is not showing up. It's most likely hiding behind body/html because of the z-index, but I want t开发者_如何转开发hem to show behind the divs in the middle. How do I fix this?


It looks like you're using a negative z-index for photos. Instead of that, use a positive or 0 index, and give the other elements a higher index. Also remember that in order for z-index to work the elements should have position: relative. I got photos to show up by having it z-index 1, having header z-index 2 and position relative.


You've had an answer, but thought I'd chip in a little to clear things up.

Z-indexing requires an element to be positioned, not necessarily relative or absolute as you've already figured out, but fixed is also an option.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜