PDA

View Full Version : Anylink Drop Down Menu - changing font color



br2419
09-23-2004, 05:51 PM
script: http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

This script is great! But i can't seem to figure out how to change the font color in the menus. Can you help me out?

thanks!

gigabites
09-23-2004, 09:10 PM
Well, the easiest way is like so...

menu1[0]='<a href="http://www.javascriptkit.com" target="_new"><font color="black">JavaScript Kit</font></a><br>'Simply wrap it with a font color tag.

br2419
09-24-2004, 02:17 PM
Thanks!

ddadmin
09-24-2004, 07:45 PM
Or if you wanted to change the font color of all text inside the menu, an easier and more elegant way is to use CSS, by add a "color" declaration inside the stylesheet:


<style type="text/css">

#dropmenudiv{
position:absolute;
color: red;
border:1px solid black;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
}

</style>

gigabites
09-24-2004, 11:39 PM
@ddadmin
That'll only work if You put a plain text inside the menus. Well, it's a hyperlink, it'll only change it's style if the "A selector" is declared.

ddadmin
09-25-2004, 12:24 AM
@ddadmin
That'll only work if You put a plain text inside the menus. Well, it's a hyperlink, it'll only change it's style if the "A selector" is declared.

Oh yes, forgot about that. :) So, the below would also need to be added:


#dropmenudiv a{
color: red;
}
Thanks for pointing it out.

gigabites
09-25-2004, 01:11 AM
Anytime ddadmin :)

longverb
03-11-2010, 09:40 PM
Where is does either of the these code go and which page? 1. On the Html page that use the code 2. anylinkmenu.css 3. anylinkmenu.js 4. menucontent.js

I have tried to put every where but the right place. thank you for you time.

ddadmin
03-12-2010, 12:27 AM
All references to the .css and .js files of the script should go in the HEAD section of your page. So would any global CSS such as:


<style type="text/css">

#dropmenudiv{
position:absolute;
color: red;
border:1px solid black;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
}

</style>