2012-04-28 53 views
1

我有这个问题,我现在处理了一段时间。我的对话框似乎弹出在我的博客内容后面。这里是一个截图。 http://wsoplugins.com/wp-content/uploads/2012/04/Capture.png 有人可以帮我解决这个问题吗? 它会在标题内容后面弹出以具体。下面的其他内容似乎很好。 非常感谢。jQuery对话框弹出我的博客内容。如何修复

.ui-dialog{ 

position: fixed; 
z-index: 99999; 

} 
+0

你的头文件和对话框弹出的CSS属性是什么?之后, – 2012-04-28 17:16:26

回答

4

尝试更改您的z-index

例如:

#myPopup{ 
    z-index: 9999; 
} 

编辑
有你的问题:

position: fixed; 

你的位置需要relativeabsolute

+0

仍然无法正常工作。谢谢。 – 2012-04-28 17:09:29

+0

@Ronny你介意发布你的代码吗? – 2012-04-28 17:11:17

+0

刚发布它DC – 2012-04-28 17:14:05

1

您可以在创建对话框时设置您的zIndex选项;

zIndex: 12000 //you can set much more 
+1

我甚至把它放在30000,仍然没有工作。 – 2012-04-28 17:09:52

1

有时候把z-index属性放在相邻的元素包装上是明智的。 z-index工作所需的唯一东西是元素应该相对,绝对或通过position属性固定。

例如HTML:

<div class="nav"> 
Multiple div's here with some text or whatever elements, some of them with z-index 
</div> 
<div class="main_content"> 
Multiple div's here with some text or whatever elements, some of them with z-index 
</div> 

CSS:

.nav{ 
    position: relative; //fixed, or absolute, otherwise z-index doesn't work 
    z-index: 40; 
} 
.main_content{ 
    position: relative; //fixed, or absolute, otherwise z-index doesn't work 
    z-index: 30; // setting it lower than the previous block 
} 

您可以添加这样的CSS,以确保任何进入后在main_content DIV的nav将被定位以较低z-index值。