IE8,XHTML,position:fixed;和z指数 [英] IE8, XHTML, position: fixed; and z-index

查看:158
本文介绍了IE8,XHTML,position:fixed;和z指数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个XHTML 1.0过渡Doctype。

I have an XHTML 1.0 transitional Doctype.

我有一个< div> c $ c> position:fixed; bottom:0px; left:0px; width:100%;

I have a <div> that is position: fixed; bottom: 0px; left: 0px; width: 100%; z-index: 200;.

< div>两个按钮是位置相对,右对齐,设置z-index为201;

Inside that <div> I have two buttons which are position relative, aligned right, with a set z-index of 201;

在Firefox中,底部的栏和两个按钮正确位于

In Firefox the bar at the bottom and the two buttons are correctly located at the bottom.

然而,在IE8中,该栏是可见的,z-index似乎是覆盖其他内容,但按钮隐藏在主div后面,尽管

In IE8 however, the bar is visible and the z-index appears to be overlaying the other content, but the buttons are hidden behind the main div, despite being children and having their z-index set.

我使用下面的meta标签;
< meta http-equiv =X-UA-Compatiblecontent =IE = edge/>
IE8模式。

I'm using the following meta tag; <meta http-equiv="X-UA-Compatible" content="IE=edge" /> to force the document into IE8 mode.

如果我模拟IE7(放在兼容模式),条和按钮工作正常。我不明白IE7的渲染如何比IE8更好。我不想强迫兼容模式由于其他事情,IE7无法呈现和IE8可以。有没有其他解决方案,或者我错过了什么?

If I emulate IE7 (put on compatability mode), the bar and buttons work just fine. I don't understand how IE7's rendering is better than IE8. I don't want to have to force compatability mode due to other things that IE7 cannot render and IE8 can. Is there another solution, or have I missed something?

谢谢。

推荐答案

我已经解决了这个问题,把按钮从容器/酒吧,并定位他们固定自己。工程在IE7,IE8,Firefox - Chrome不喜欢做100%的位置:固定;酒吧。 Damnit。

I have solved the issue by taking the buttons out of the container/bar, and positioning them fixed themselves. Works in IE7,IE8,Firefox - Chrome doesn't like doing 100% on the position: fixed; bar. Damnit.

这篇关于IE8,XHTML,position:fixed;和z指数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆