Hallo liebe Forum-Gemeinde
Ich habe ein Dropdown Menü Ebene 1 und Ebene 2. Die Ebene 1 enthält auch Seiten und wenn ich eine davon besuche sollte der Button färbig unterlegt sein. Wenn ein Seite aus Ebene 2 angezeigt wird sollte er wieder neutral sein.
Irgenwie bekomme ich das nicht hin, das der Button aus Ebene 1 nur bei angezeigter Seite unterlegt ist.
Aufbau im Menübaum:
Ebene1 -> Seite hat Inhalte
-Ebene2
-Ebene2
### Menü ###
lib.mainMenu = HMENU
lib.mainMenu {
### Erste Ebene ###
1 = TMENU
1 {
wrap = <ul>|</ul>
expAll = 1
NO.wrapItemAndSub = <li>|</li>
ACT < .NO
ACT = 1
ACT.wrapItemAndSub = <li class="act">|</li>
}
### Zweite Ebene ###
2 = TMENU
2 {
wrap = <ul>|</ul>
NO.wrapItemAndSub = <li>|</li>
ACT < .NO
ACT = 1
ACT.wrapItemAndSub = <li class="act">|</li>
}
}
* CSS Document */
.menu {
width:955px;
}
/* remove all the bullets, borders and padding from the default list styling */
.menu ul { padding:0; margin:0; list-style-type:none; }
/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
.menu li {
float:left;
position:relative;
width: 190px;
}
/* style the links for the top level */
.menu a {
display:block;
font-size:13px;
text-decoration:none;
width:185px;
height:20px;
font-family: Arial, Helvetica, sans-serif;
color: #FFFFFF;
text-align: center;
margin-left: 3px;
margin-right: 3px;
background-color: #000000;
line-height: 20px;
font-weight: bold;
}
/* background ebene 1 bei aktive */
.menu ul li.act a {
background-color: #ff3300;
}
/* background bei eben 2 aktive */
.menu ul ul li.act a {
background-color: #d9166e;
}
/* bei act einblenden */
.menu ul li.act ul {
visibility:visible;
}
/* bei mouse over visble */
.menu ul li:hover ul {
visibility:visible;
}
/* hide the sub levels and give them a positon absolute so that they take up no room */
.menu ul ul{
visibility:hidden;
height:0;
top:30px;
left:0;
right: 5px;
}
/* style the second level links */
.menu ul ul a, .menu ul ul a:visited {
background-color:#000000;
color:#FFFFFF;
height:auto;
line-height:20px;
width:185px;
margin-top: 1px;
margin-right: 0px;
}
/* highlight */
.menu ul ul li a:hover, .menu ul li a:hover {
background-color: #d9166e;
}
<div class="menu">
<ul>
<li class="act"><a href="index.php?id=5" onfocus="blurLink(this);">Ebene 1</a>
<ul>
<li><a href="index.php?id=9" onfocus="blurLink(this);">Ebene 2.0</a></li>
<li class="act"><a href="index.php?id=8" onfocus="blurLink(this);">Ebene 2.1</a></li>
</ul>
</li>
</ul>
</div>