2011-09-19 188 views
0

我有這個網站:http://dev.gratefulhearttherapy.org/ 有一個下拉菜單,它應該展開,當你懸停像「我們的服務」或「Abous我們」的類別。但事實並非如此。CSS:下拉菜單不顯示

我知道這是一個CSS問題,因爲我使用了2種不同的樣式表,一種可以工作,而另一種不能。不過,我花了兩個小時,並沒有發現什麼問題。

我試圖玩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;} 

回答

3

這是因爲你的#headerNav設置爲overflow:hidden。只要刪除這行的CSS:

#headerNav { 
    … 
    overflow: hidden; 
    …  
} 
+0

是的!謝謝!我知道這是很簡單的,我看了我的CSS幾個小時後就錯過了......這是我得到一個凌亂的文件。再次感謝 –

+0

歡迎您:)如果您沒有其他問題,請將我的答案設置爲已接受。 – gearsdigital