简体   繁体   English

GWT CSS问题

[英]GWT CSS problem

I have a menu on the top of a page and when I get the sub menu, it is collapsing with the existing html on the host page 我在页面顶部有一个菜单,当我看到子菜单时,它与宿主页面上的现有html折叠在一起

Menu when not yet clicked 尚未点击时的菜单 替代文字

Menu when menu item clicked 单击菜单项时的菜单 替代文字

Just notice the blue line is comming on the top of the sub menu 只需注意子菜单顶部的蓝线已来

The menu is found in a div 菜单位于div中

can someone helps?? 有人可以帮忙吗?

So what I understand is your sub menu doesn't come on top of the blue bar, but instead, is seen under it. 因此,据我了解,您的子菜单不在蓝色条的顶部,而是在其下方。 That could be the problem, but need not be. 那可能是问题,但不是必须的。

You'll need to find the CSS class used for the sub menu (something like firebug on Firefox will help you here, or IE developer toolbar in IE), and then check the following: 您需要找到用于子菜单的CSS类(例如Firefox上的firebug会在这里帮助您,或IE中的IE开发人员工具栏),然后检查以下内容:

1) If there's a background colour set anywhere. 1)如果任何地方都设置了背景色。 If not, add it 2) the z-index of the sub menu. 如果不是,则添加2)子菜单的z-index。 If its no >= 1, then increase it. 如果其否> = 1,则增加它。 If there is no z-index, try adding it to 1 or 10. Check the z-index of the logo image. 如果没有z-index,请尝试将其添加到1或10。检查徽标图像的z-index。 If there is no z-index, don't worry about it. 如果没有z-index,请不必担心。 If there is, you need to make sure that the z-index of the submenu is greater than the z-index of the logo image. 如果存在,则需要确保子菜单的z-index大于徽标图像的z-index。

这是因为蓝线的z索引大于菜单的z索引,因此通过CSS如果将菜单的z索引增加到蓝线以上,则可以解决问题。

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

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