2012-12-02 169 views
1

我已經在joomla網站上設置了一個suckerfish下拉菜單,但是我找不到一種方法來保持頂級菜單項被選中(在這種情況下會變成紅色並保持紅色) - 選擇子菜單項後。suckerfish頂級項目選擇子菜單項時突出顯示

將鼠標懸停在頂層項目上並沒有問題,當您將鼠標懸停在子菜單上時,它仍然是懸停的顏色 - 但只要單擊子菜單項,頂級項目就會恢復爲原始顏色。

這意味着訪問者不一定會知道他們所在網站的哪個部分。

所以任何幫助將是偉大的!謝謝。

我目前的CSS是:

#mainlevelmainnav, #mainlevelmainnav ul {float: right;list-style: none;line-height: 1;} 
#mainlevelmainnav a {display: block;} 
#mainlevelmainnav li {float: left;padding: 0;margin-right:20px;font-size: 14px;color: #B8A4AA} 
#mainlevelmainnav li ul { 
    position: absolute; 
    left: -999em; 
    height: auto; 
    width: 14em; 
    w\idth: 13.9em; 
    font-weight: normal; 
    border-width: 0.25em; 
    margin: 0; 
    z-index:1; 
    padding-top:60px; 
    background-color:rgba(255,255,255,0.9); 
    z-index:2; 
} 

#mainlevelmainnav li ul li {margin-bottom:15px; padding-left:5px} 
#mainlevelmainnav li li {padding-right: 1em;list-style:none;background:none;width: 18em;} 
#mainlevelmainnav li ul a {width: 18em;w\idth: 17.6em;} 
#mainlevelmainnav li ul ul {margin: -1.75em 0 0 12em;background:#e7e7e7 url(../images/menu_li.gif) top right;} 
#mainlevelmainnav li:hover ul ul, #mainlevelmainnav li:hover ul ul ul, #mainlevelmainnav li.sfhover ul ul, #mainlevelmainnav li.sfhover ul ul ul { left: -999em;} 
#mainlevelmainnav li:hover ul, #mainlevelmainnav li li:hover ul, #mainlevelmainnav li li li:hover ul, #mainlevelmainnav li.sfhover ul, #mainlevelmainnav li li.sfhover ul, #mainlevelmainnav li li li.sfhover ul {left: auto;} 
#mainlevelmainnav li:hover, #mainlevelmainnav li.sfhover {} 
#mainlevelmainnav ul.menu {margin:0;} 
#mainlevelmainnav ul.menu li {background:#e7e7e7 url(../images/menu_li.gif) top right no-repeat;} 
#mainlevelmainnav ul.menu li a {color: #656565;padding: 2px 0;display: block;text-decoration: none;outline: none;background:none} 
#mainlevelmainnav ul.menu li a span, 
#mainlevelmainnav ul.menu li li a span{padding: 0 15px;background: none;} 
#mainlevelmainnav ul.menu li li li a:hover, 
#mainlevelmainnav ul.menu li li li a:active, 
#mainlevelmainnav ul.menu li li li a:focus, 
#mainlevelmainnav ul.menu li li a:hover, 
#mainlevelmainnav ul.menu li li a:active, 
#mainlevelmainnav ul.menu li li a:focus, 
#mainlevelmainnav ul.menu li a:hover, 
#mainlevelmainnav ul.menu li a:active, 
#mainlevelmainnav ul.menu li a:focus, 
#mainlevelmainnav ul.menu li:hover, 
#mainlevelmainnav ul.menu li:active, 
#mainlevelmainnav ul.menu li:focus {background:#dadada!important;color: #000;text-decoration: none;} 
#mainlevelmainnav ul.menu li.active a {font-weight: bold;text-decoration: none;} 
#mainlevelmainnav ul.menu li .parent{background:#dadada url(../images/menu_sub_arrow.gif) center right no-repeat;} 
#mainlevelmainnav ul.menu li.active a span {} 
#mainlevelmainnav ul.menu li li a span {padding: 0;background: none;} 
#mainlevelmainnav ul.menu li ul {border:1px solid #cccccc;padding: 0;list-style: none;} 
#mainlevelmainnav ul.menu li li {padding: 0!important;list-style: none;} 
#mainlevelmainnav ul.menu li li a {color: #333333;font-size: 92%;font-weight: normal;padding:0 10px;} 
#mainlevelmainnav ul.menu li li a:hover, 
#mainlevelmainnav ul.menu li li a:active, 
#mainlevelmainnav ul.menu li li a:focus {} 
#mainlevelmainnav ul.menu li li a span {font-weight: normal;} 

回答

0

您將需要使用JavaScript或服務器端編程爲類添加到說,這是積極的父李,然後使用CSS皮卡那類,並應用可視化樣式。

相關問題