
Originally Posted by
magruth
I am using the Switch Menu
http://www.dynamicdrive.com/dynamici...switchmenu.htm
I really like it, but would like to be able to have the current selected menu item stay highlighted so the user knows where they are.
If anyone knows how to modify the code to support this, I would really appreciate sharing this with me!
Thanks
It's all CSS based.
Add a new id or class selector, call it current.
So it's like this:
Code:
.menutitle{
cursor:pointer;
margin-bottom: 5px;
background-color:#ECECFF;
color:#000000;
width:140px;
padding:2px;
text-align:center;
font-weight:bold;
}
.submenu{
margin-bottom: 0.5em;
}
#current{
cursor:pointer;
margin-bottom: 5px;
background-color:#FF0000;
color:#FFFFFF;
width:140px;
padding:2px;
text-align:center;
font-weight:bold;
}
So you add it like this in RED.
Code:
<div class="menutitle" onclick="SwitchMenu('sub1')" id="current">Site Menu</div>
Have you guys had any experience with HTML, CSS?
Anyways if you want it dynamic, do this:
Dynamic_Menu_Highlighting
This is better:
current_menu_state_with_css/
Cheers
Bookmarks