PDA

View Full Version : Change Font Color of Any Link Drop Down Menu



RedRhino
08-30-2008, 01:32 PM
1) Script Title:
Any Link Drop Down Menu

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

3) Describe problem:
Hi, I'm currently evaluating this script and was wondering how I can modify the font color in the drop-down boxes of the menu. Also, is it possible to drop the drop-down boxes a little further below the link, let's say "Web Design"?

Thanks

Nile
08-31-2008, 03:04 AM
In the CSS simply find, or make the "color" property in css, for example:


<style type="text/css">
#div {
color: lightblue;
}
</style>
<div id="div">
I'm light blue
</div>

RedRhino
08-31-2008, 09:45 PM
In the CSS simply find, or make the "color" property in css, for example:


<style type="text/css">
#div {
color: lightblue;
}
</style>
<div id="div">
I'm light blue
</div>


Not happening! There isn't any color related CSS property in the CSS or JS file. If I create it and place the link inside a div tag, nothing happens.

ddadmin
09-01-2008, 06:29 AM
Specifically, to change the color of the links within the drop down menu, add the line in red below:


#dropmenudiv a{
width: 100%;
color: green;
display: block;
text-indent: 3px;
border-bottom: 1px solid black;
padding: 1px 0;
text-decoration: none;
font-weight: bold;
}

You can increase the vertical offset of the drop down menus relative to the anchor links, but if you increase it by too much, the menu will disappear as soon as the mouse rolls out of the anchor link, before it reaches the menu itself. With that said, make the changes in red:


dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+3+"px"

Where 3 would be 3px extra.