www.webdeveloper.com
Results 1 to 2 of 2

Thread: Active link not changing color

  1. #1
    Join Date
    Jun 2005
    Posts
    201

    Active link not changing color

    Hello there. I am working on a new webpage that CSS style sheets came with already. Rather than make a brand new one, I am working with what is came with. I can't figure out how to make the active link's text color work correctly though. I can get the active page's link background to change, but not the text color. Here is a sample of the CSS. Maybe someone knows how to fix it.
    Code:
    #primary-nav a { 
       border: 1px solid #006699; 
       display: block; 
       margin: 0px; 
       padding: 5px 10px; 
       color: #000000;
       text-decoration: none; 
       background: transparent; 
       min-height:1em;
    }
    #primary-nav li, #primary-nav li.menuparent { 
       background-color: #B8AE9C; 
       min-height:1em;
    }
    
    
    /* Styling the basic apperance of the active page elements (shows what page in the menu is being displayed) */
    #primary-nav li.menuactive { 
       background-color: #595241;
       color: #FFFFFF;
    }
    Not sure what the .menu stuff is after the styles but maybe someone does. Thanks.

  2. #2
    Join Date
    Mar 2006
    Location
    Newcastle NSW Australia
    Posts
    4,033
    You need to change the colour of the <a> itself, not just the <li>, so add :
    Code:
    #primary-nav li.menuactive a { 
       color: #FFFFFF;
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles