Results 1 to 9 of 9

Thread: Anylink Drop Down Menu - changing font color

  1. #1
    Join Date
    Sep 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Anylink Drop Down Menu - changing font color

    script: http://www.dynamicdrive.com/dynamici...pmenuindex.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!

  2. #2
    Join Date
    Sep 2004
    Location
    Indonesia
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well, the easiest way is like so...
    Code:
    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.

  3. #3
    Join Date
    Sep 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks!

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

    Default

    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:

    Code:
    <style type="text/css">
    
    #dropmenudiv{
    position:absolute;
    color: red;
    border:1px solid black;
    font:normal 12px Verdana;
    line-height:18px;
    z-index:100;
    }
    
    </style>

  5. #5
    Join Date
    Sep 2004
    Location
    Indonesia
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    @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.

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

    Default

    Quote Originally Posted by gigabites
    @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:

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

  7. #7
    Join Date
    Sep 2004
    Location
    Indonesia
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Anytime ddadmin

  8. #8
    Join Date
    Mar 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.
    Last edited by longverb; 03-11-2010 at 09:42 PM. Reason: did not complete my thoughts

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

    Default

    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:

    Code:
    <style type="text/css">
    
    #dropmenudiv{
    position:absolute;
    color: red;
    border:1px solid black;
    font:normal 12px Verdana;
    line-height:18px;
    z-index:100;
    }
    
    </style>
    DD Admin

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
  •