简体   繁体   English

调试在IE9中无法正确显示的弹出窗口

[英]Debugging a popup that doesn't display correctly in IE9

I've asked this in another question where we could not solve it 我在另一个问题中问过我们无法解决的问题

Filling the top part of this window? 填充此窗口的顶部?

and now I've got the faulty code in a fiddle that we can debug: http://jsfiddle.net/qffh5/6/ 现在我得到了可以调试的小提琴中的错误代码: http : //jsfiddle.net/qffh5/6/

In internet explorer 9 the top of the window is not filling all the way. 在Internet Explorer 9中,窗口顶部并未完全填充。 I suspect that CSS is being overridden so I looked in IE with the developer tools but couldn't find what was wrong: 我怀疑CSS已被覆盖,因此我使用开发人员工具查看了IE,但找不到错误所在:

在此处输入图片说明

在此处输入图片说明

When I pinpoint your issue I noticed that the styles are not correctly inherited. 当我查明您的问题时,我注意到样式没有正确继承。 So i have cleaned up your fiddle so that only the "problem" existed. 因此,我已经清理了您的小提琴,以便仅存在“问题”。

html html

<div id="topBar">
    <span class="pusher TB_nb">
        <h2>Some text</h2>
    </span>
    <span id="close">
       <a href="#todo" onclick="#do something">X</a>
    </span>
</div>

Your CSS 您的CSS

#topBar {width:100%; background-color:#EFEFDC;}
#close {position:absolute; right:5px;}

* Fiddle with only this part: http://jsfiddle.net/qffh5/30/ * * 仅用这一部分进行摆弄: http : //jsfiddle.net/qffh5/30/ *

Corrected CSS 更正的CSS

#topBar {width:100%; background-color:#EFEFDC; display:inline-block;}
#topBar h2 {float:left}
#close {position:relative; float:right;}​

fiddle can be found here : http://jsfiddle.net/qffh5/28/ 小提琴可以在这里找到: http : //jsfiddle.net/qffh5/28/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM