PDA

View Full Version : Any link DD menu - colors



GocFonStrauss
09-29-2005, 01:03 PM
Hi everyone :)

I was playing around with Any link DD menu script and I have question for you guys.

Is there any way that drop menus can be in different color for every link? For example, Demo script (http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm). When submenue is visible for Web design link, on mouse over there is yellow color. Is there any way to have red color for Technology submenue? Blue for New Sites...?

Thank you

jscheuer1
09-29-2005, 02:58 PM
Assign an ID to each link that you want a certain different hover color for, ex:

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a id="news" href="http://cnn.com">CNN</a>'
menu2[1]='<a id="news" href="http://msnbc.com">MSNBC</a>'
menu2[2]='<a id="news" href="http://news.bbc.co.uk">BBC News</a>'Then in the style section add a declaration for it like:

a:hover#news {
background-color: lightblue;
}

GocFonStrauss
09-29-2005, 05:46 PM
Thank you jscheuer1 :)