IE7与下拉菜单切割与其他元素

时间:2012-01-12 11:20:16

标签: css internet-explorer-7

在Internet Explorer 7中,顶部水平菜单显示页面上div标签下的子类别。菜单的项目相对或绝对定位,z-index高于div标签。如何让下拉列表显示在页面中的其他内容之前?

请在iE7浏览器中查看www.luxos.com,请帮助我似乎没办法从这里出来

这是我用于IE7 CSS的CSS代码

#head-nav { height: 35px; right:149px;}

#head-nav li{ position: relative; }


#head-nav li .subnav{z-index:99999;}
.subnav-viewport {z-index:99999;}

以下是适用于所有其他浏览器的代码

ul#head-nav {font-family:Arial, Helvetica, sans-serif;font-size: 13px;position: absolute;top: 104px;letter-spacing: .1em;}
ul#head-nav li {float:left;margin:0px 1px 0px 0px;padding: 0;position:relative;}

/*ul#head-nav li a {color:#000;text-decoration:none;padding:0 0 3px 0;font-weight:300;}
ul#head-nav li a:hover {border-bottom:5px solid #ccc}*/

/*---------------------New Menu navigation system 02/08/2010--------------*/
/*.menubutton{background:url("../images/menu-button-slice.jpg") no-repeat scroll right 0 transparent;padding:0px 4px 0px 0px;display:inline-block;}
.menubutton a{background:url("../images/menu-button.jpg") no-repeat scroll 0 0 transparent;color:#FFFFFF;padding:0px 9px 0px 15px;display:inline-block;height:25px;line-height:23px;}*/

/*---------------------Menu Buttons changed 23/02/2011----------------------*/
.menubutton{background:#58595b;padding:0px;display:inline-block;width:150px;text-align:center;}
.menu-down-button{background:url("/interface/images/menu-down.jpg") no-repeat scroll 124px 8px #58595b;padding:0px;display:inline-block;width:150px;text-align:center;}
.menubutton a{color:#FFFFFF;display:inline-block;height:25px;line-height:23px;}

ul#head-nav li .subnav{width:150px;position:absolute;background:#ffffff;padding:4px 0px;margin:0px;display:none;z-index:99;background: url("/interface/images/menu-dropdown-bg.gif") repeat-y 0 0;border-bottom:1px solid #cfcfcf;}
ul#head-nav li .subnav li {float:none;padding:0px;margin:0px;display:block;height:20px;}
ul#head-nav li .subnav li.menu-divider {border-top:1px dashed #444444;width:120px; display:block;height:2px;margin:4px 7px;}
ul#head-nav li .subnav a, .menu-title{color:#808080;font-family:Helvetica,Arial,"Liberation Sans","Bitstream Vera Sans",sans-serif;font-size:12px;display:block;padding:0px 8px;;margin:1px 0px 1px 0px;letter-spacing:0;}
ul#head-nav li .subnav a:hover{background:#444444;color:#ffffff;}
.subnav-viewport {display:none;position:absolute;height:457px;width:136px;overflow:hidden;z-index:999;left:0;top:19px;background: url("/interface/images/subnav-viewport-arrow-bg.gif") no-repeat 0 0;padding-top:8px;}
.subnav-viewport li.down{}
.subnav-viewport li.up{}

.menu-title{font-weight:bold;padding:0px 8px !important;}
.menu-bold{font-weight:bold;}

ul#head-nav li .subnav li.menu-underline a{text-decoration:underline;}

1 个答案:

答案 0 :(得分:1)

您的信息页遭遇an IE7 bug

在这种特定情况下,您可以按照以下步骤进行修复:

  • #head-nav上,添加z-index: 1
  • 点击#header,删除position: relative
  • 不幸的是,你的标题现在有点破了。要解决此问题,请在a#head-logobottom: 63px更改为top: 28px