我有这个网站:http://dev.gratefulhearttherapy.org/ 使用下拉菜单,当您悬停“我们的服务”或“Abous Us”等类别时,它应该展开。但事实并非如此。
我知道这是一个CSS问题,因为我使用了两种不同的样式表,一种是有效的,另一种则没有。但是我花了两个小时才发现它并没有找到什么问题。
我尝试使用z-index但它不起作用。我接管了别人的工作,CSS文件很乱,网站调用了几个样式表。无论如何,我正在使用的样式表在这里:http://dev.gratefulhearttherapy.org/index.php/tools/css/themes/gratefulheart/typography-new2.css
CSS的相关部分开始第287行,即“Mega Menu”部分。这是:
任何人都可以向我提一下可能存在的问题吗?
/* Mega Menu */
.top-level-nav a.nav-path-selected {
color: #EA5603 !important;
ul.mega-menu {
height: 44px;
width: 96%;
text-align: left;
margin: 10px 0 0 20px;
padding: 0 60px;
text-indent: 0;
list-style-type: none;
margin-left: -1px;
}
ul li.mega-menu {
padding: 0;
margin: 0;
text-indent: 0;
display: inline;
line-height: 44px;
}
ul li a.mega-menu {
text-decoration: none;
color: #DE573C;
font-size: 138.5%;
}
.nav li a:hover {
color: #8e4c0f;
}
.custom {line-height: 1.6;}
.custom ul.mega-menu, .custom ul.mega-menu, .custom ul.mega-menu li {margin: 0; padding: 0; border: none;}
.custom ul.mega-menu {
background: #D6CEB4;
width: 100%;
height: 44px;
border-top: solid 2px #CCC2A5;
border-bottom: solid 2px #CCC2A5;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;; position: relative;
}
.custom ul.mega-menu li {float: left; margin: 0; padding: 0; }
.custom ul.mega-menu li a {float: left; display: block; padding: 12px 38px 12px 25px; ; text-decoration: none; color: #3B3B3B; font-size: 138.5%; text-decoration: none;}
.custom ul.mega-menu li a.dc-mega {position: relative;}
.custom ul.mega-menu li a .dc-mega-icon {display: block; position: absolute; top: 18px; right: 15px; width: 8px; height: 6px; background: url(images/arrow.png) no-repeat 0 0;}
.custom ul.mega-menu li.mega-hover a, .custom ul.mega-menu li a:hover {background-position: 100% -40px; color: #8e4c0f;}
.custom ul.mega-menu li.mega-hover a .dc-mega-icon {background-position: 0 100%;}
.custom ul.mega-menu li .sub-container { /* block container of dropdown submenu when it's closed (I think) */
position: absolute;
background: url(images/bg_sub_left.png) no-repeat 0 100%;
padding: 10px 10px 0 10px;
margin-left: -3px;
}
.custom ul.mega-menu li .sub { /* dropdown submenu itself */
margin: -8px 0 0 -8px;
background: #E3DDD3
url(images/bg_sub.png) no-repeat 100% 100%;
padding: 00px 20px 20px 10px;
border: 1px #D1C6B4;
border-style: none solid solid solid;
/* rounded corners */
-webkit-border-bottom-right-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-moz-border-radius-bottomright: 3px;
-moz-border-radius-bottomleft: 3px;
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
/* dropshadow effect */
-webkit-box-shadow: 0px 4px 6px rgba(50, 50, 50, 0.6);
-moz-box-shadow: 0px 4px 6px rgba(50, 50, 50, 0.6);
box-shadow: 0px 4px 6px rgba(50, 50, 50, 0.6);
}
.custom ul.mega-menu li .sub-container.mega .sub {padding: 20px 20px 10px 0;}
.custom ul.mega-menu li .sub .row {width: 100%; overflow: hidden; clear: both;}
.custom ul.mega-menu li .sub li {list-style: none; float: none; width: 170px; font-size: 120%; line-height: 2;} /* li of dropdown submenu */
.custom ul.mega-menu li .sub li.mega-hdr {margin: 0 10px 10px 0; float: left;}
.custom ul.mega-menu li .sub li.mega-hdr.last {margin-right: 0;}
.custom ul.mega-menu li .sub a, .custom ul.mega-menu li .sub span {background: none; border: none; text-shadow: none; color: #111; padding: 7px 10px; display: block; float: none; text-decoration: none; font-size: 0.9em;}
.custom ul.mega-menu li .sub li.mega-hdr .mega-hdr-a {padding: 5px 5px 5px 15px; margin-bottom: 5px; background: #6B6B6B url(images/bg_mega_hdr.png) no-repeat 0 0; text-transform: uppercase; font-weight: bold; color: #fff; text-shadow: 1px 1px 1px #333;}
.custom ul.mega-menu li .sub li.mega-hdr a.mega-hdr-a:hover {color: #000; text-shadow: none;}
.custom ul.mega-menu .sub li.mega-hdr li a {padding: 4px 5px 4px 20px; background: url(images/arrow_off.png) no-repeat 5px 8px; font-weight: normal;}
.custom ul.mega-menu .sub li.mega-hdr li a:hover {color: #a32403; background: #efefef url(images/arrow_on.png) no-repeat 5px 8px;}
.custom ul.mega-menu .sub ul li {padding-right: 0;}
.custom ul.mega-menu li .sub-container.non-mega .sub {padding: 20px 20px 20px 0;}
.custom ul.mega-menu li .sub-container.non-mega li {padding: 0; width: 190px; margin: 0;}
.custom ul.mega-menu li .sub-container.non-mega li a {padding: 7px 5px 7px 22px; background: url(images/arrow_off.png) no-repeat 7px 10px;}
.custom ul.mega-menu li .sub-container.non-mega li a:hover {color: #a32403; background: #efefef url(images/arrow_on.png) no-repeat 7px 10px;}
答案 0 :(得分:3)
这是因为您的#headerNav
设置为overflow:hidden
。只需删除这行css:
#headerNav {
…
overflow: hidden;
…
}