Results 1 to 4 of 4

Thread: Changing text color for selectedanchor in anylinkmenu.css

  1. #1
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Changing text color for selectedanchor in anylinkmenu.css

    1) Script Title: AnyLink JS Drop Down Menu v2.2

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    Hello

    I saw that a few other have asked this question as well but seem not to have followed through.

    The menu works fine, but the text-color reverts to default if I'm on the drop down menu, soi I thought I can change this behavior in the anylinkmenu.css for the selectedanchor just with 'color. #6666'

    Code:
    .selectedanchor{ /*CSS class that gets added to the currently selected anchor link (assuming it's a text link)*/
    	background: #ffffff;
    	font-size: 11px;
    	color: #666666;
    	font-family: Arial, Helvetica, sans-serif;
    	font-weight: bold;
    	text-decoration: none;
    }
    However, this doesn't seem to work at all. The link behaviour should be as follow: Black as initial state, and on both hover/active when drop down menu is open, set to dark grey.

    I'm working with two kinds of link behaviours on the same page, and the one that is attached to the menuanchorclass is this one:

    Code:
    <style type="text/css">
    .mainnavi {
    	font-size: 11px;
    	text-weight: normal;
    	text-decoration: none;
    	color: #000000;
    	font-weight: bold;
    	font-family: Arial, Helvetica, sans-serif;
    }
    a.mainnavi:link {  font-family: Arial, Helvetica, sans-serif; font-size: 11px; text-decoration: none; color: #000000}
    a.mainnavi:active { font-family: Arial, Helvetica, sans-serif; font-size: 11px; text-decoration: none; color: #666666}
    a.mainnavi:visited { font-family: Arial, Helvetica, sans-serif; font-size: 11px; text-decoration: none; color: #000000}
    a.mainnavi:hover { font-family: Arial, Helvetica, sans-serif; font-size: 11px; text-decoration: none;  color: #666666}
    </style>
    This one's internal on every page, and that's what I'm trying to achieve, that, when I select links from within the drop down menu, the original link stays dark grey as well.

    Any help would be truly appreciated.

    Bloch

  2. #2
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Vanity kick.

    No go? Changing the background color works fine, but there's obviously something I miss changing the font color when link is triggered and drop down menu is open?

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

    Default

    Have you tried using CSS's !important keyword to make sure the style you want applied takes precedence over all else? For example:

    Code:
    .selectedanchor{ /*CSS class that gets added to the currently selected anchor link (assuming it's a text link)*/
    	background: #ffffff;
    	font-size: 11px;
    	color: #666666 !important;
    	font-family: Arial, Helvetica, sans-serif;
    	font-weight: bold;
    	text-decoration: none;
    }
    DD Admin

  4. The Following User Says Thank You to ddadmin For This Useful Post:

    bloch (01-25-2010)

  5. #4
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    That did the trick! Thank you so much for taking the time having a look. Honestly, I've never heard of this !important keyword before.

    Thank you again!
    bloch

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
  •