PDA

View Full Version : Chrome Menu



sceadu
02-20-2007, 04:26 PM
1) Script Title: Chrome CSS Drop Down Menu (v2.01)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm

3) Describe problem:

Is there a way to have one of the top level menu items be appear "selected" when a page loads? Of course as the script is written one has to mouse over an item to trigger the background image change.

I would like to reinforce to a visitor where they are on the site and be able to use the Chrome menu.

ddadmin
02-21-2007, 06:25 AM
Sure, inside the .css file, find and add to the line:


.chromestyle ul li a:hover, .chromestyle ul li a#selecteditem{
background: url(chromebg-over.gif) center center repeat-x; /*THEME CHANGE HERE*/
}

Code in red is new. Then, inside your HTML, to have a particular main menu item selected, do the below:


<div class="chromestyle" id="chromemenu">
<ul>
<li><a href="http://www.dynamicdrive.com">Home</a></li>
<li><a href="#" rel="dropmenu1" id="selecteditem">Resources</a></li>
<li><a href="#" rel="dropmenu2">News</a></li>
<li><a href="#" rel="dropmenu3">Search</a></li>
</ul>
</div>

sceadu
02-21-2007, 05:58 PM
Outstanding! Many many thanks.:)