View Full Version : Question about Any Link drop down menu

07-21-2005, 01:41 PM
I am a newbie to drop down menus and have downloaded the Any Link script to play around with. Everything seems fine but I really want to remove all underlines from the links. I've sussed out how to remove them from the top level menu and also how to remove them from the 2nd level mouseover by adding a "text-decoration: none;" instruction to the a:hover section (see below)

#dropmenudiv a:hover{
background-color: white;
text-decoration: none;

However I can't seem to find a way to remove the underline in the mouse-out state. I've posted a test page at this URL:


Grateful for any help please.

07-21-2005, 07:54 PM

#dropmenudiv a{

also add text-decoration: none. That will do it.

07-22-2005, 08:22 AM
I'm sure I tried that already but maybe I typed something wrong - I'll give it another go.


07-22-2005, 08:25 AM
Cheers bud, that worked.
Thanks a lot.

07-26-2005, 02:44 PM
Apologies for the delay since last post but I'm only able to work on this project when my other work allows me the time. I have one further question about the drop down script. How do I prevent the script from creating a drop down submenu when I don't want one on a particular menu option? - e.g. I'd like to be able to go to the Homepage or Contact page just by clicking on their links on top level menu.

I have a test page at www.parentingwestlothian.org.uk/testpage.htm


07-26-2005, 07:00 PM
For the menu item you want the top link to function, simply edit its HTML code:

<a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()">Web Design</a>

and remove the onClick portion:

<a href="default.htm" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()">Web Design</a>

07-27-2005, 03:07 PM
Sorry to be a pain, but when I remove the onClick part from the 'Home' link it still shows a drop down on mouseover. Should I also be changing something in the '//Contents for menu 1' script in the <head> section of the HTML? I tried removing this part altogether but got a script error when I moused over the Home button.

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="http:#">Home</a>'

Test page is at www.parentingwestlothian.org.uk/testpage.htm

Thanks again.

07-27-2005, 03:18 PM
Sorry, ignore that last statement please. After playing around with it I discovered I need to remove the onMouseover part as well as that is what triggers off the submenu. The HTML line now just has the following

<a href="default.htm" style="text-decoration: none" >

This is the only way I get the link to work from the top level only.

Thanks for the help.

07-27-2005, 04:58 PM
Ah I didn't think you actually wanted to completely disable the drop down menu (which removing the onMouseover part will do).

07-28-2005, 08:39 AM
Sorry, I probably didn't explain it very well. Thanks for your help. ;)