Results 1 to 10 of 10

Thread: Question about Any Link drop down menu

  1. #1
    Join Date
    Jul 2005
    Location
    West Lothian, Scotland
    Posts
    37
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Question about Any Link drop down menu

    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:

    http://www.parentingwestlothian.org.uk/menu_test.htm

    Grateful for any help please.
    Last edited by Franco50; 07-21-2005 at 02:03 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Inside:

    #dropmenudiv a{
    }

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

  3. #3
    Join Date
    Jul 2005
    Location
    West Lothian, Scotland
    Posts
    37
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    I'm sure I tried that already but maybe I typed something wrong - I'll give it another go.

    Thanks.

  4. #4
    Join Date
    Jul 2005
    Location
    West Lothian, Scotland
    Posts
    37
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Cheers bud, that worked.
    Thanks a lot.

  5. #5
    Join Date
    Jul 2005
    Location
    West Lothian, Scotland
    Posts
    37
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    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

    Thanks.
    Last edited by Franco50; 07-26-2005 at 02:48 PM.

  6. #6
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    For the menu item you want the top link to function, simply edit its HTML code:

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

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

  7. #7
    Join Date
    Jul 2005
    Location
    West Lothian, Scotland
    Posts
    37
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    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.

  8. #8
    Join Date
    Jul 2005
    Location
    West Lothian, Scotland
    Posts
    37
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    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.

  9. #9
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Ah I didn't think you actually wanted to completely disable the drop down menu (which removing the onMouseover part will do).

  10. #10
    Join Date
    Jul 2005
    Location
    West Lothian, Scotland
    Posts
    37
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Sorry, I probably didn't explain it very well. Thanks for your help.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •