开发者

CSS: Dropdown menu not displaying

开发者 https://www.devze.com 2023-04-05 19:13 出处:网络
I have this website: http://dev.gratefulhearttherapy.org/ with a dropdown menu, it\'s supposed to unfold when you hover a category like \"Our Services\" or \"Abous Us\". But it doesn\'t.

I have this website: http://dev.gratefulhearttherapy.org/ with a dropdown menu, it's supposed to unfold when you hover a category like "Our Services" or "Abous Us". But it doesn't.

I know it's a CSS issue because I use 2 different stylesheets, and one works while the other doesn't. However I've spent two hours on it and I don't find what's wrong.

I tried to play with z-index but it doesn't work. I took over someone else's work and CSS file is messy, and the website calls several stylesheets. In any case, the stylesheet I'm working with is here: http://dev.gratefulhearttherapy.org/index.php/tools/css/themes/gratefulheart/typography-new2.css

The relevant part of the CSS begins line 287, the "Mega Menu" section. Here it is:

Can anyone give me a tip at what might be the issue?

/* 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 {m开发者_开发技巧argin: 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;}


It's because your #headerNav is set to overflow:hidden. Just remove this line of css:

#headerNav {
    …
    overflow: hidden;
    …    
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号