In my web site I have a menu bar with drop down menus for some of the items. When viewing one of the sub-pages I want the parent item in the menu bar to be highlighted (class='active
).
Here is my code:
<div id="sidebar-left">
<div class="menu">
<ul class="listeohne">
<li class="color1" id='active'><a href="index.php">Startseite</a>
</li>
<li class="color2"><a href="">Wer wir sind</a>
<ul>
<li class="whiteback">
<a href="werwirsind.php">Einführung</a>
</li>
<li class="whiteback"><a href="statuten.php">Statuten</a>
</li>
<li class="whiteback"><a href="vorstand.php">Vorstand </a>
</li>
<li class="whiteback borderbottomgrey"><a href="pdf/organigramm_svnw_13.pdf">Organisation </a>
</li>
</ul>
</li>
View example site www.nzz.ch. My site is www.svnw.ch.
I have tried numerous solutions described in this forum, but none of them works for me, but then I am not an expert.