• https://www.iphonecaseforsale.com/investment-banking-corporate-finance-services/

    Please take a look at this page. In the drop down menu “IB Advisory Services”, click on either page, and the entire menu and drop down changes color to #00FF00.

    I only want the page that is selected to change color, and the very top nav bar item “IB Advisory Services”. The rest of the font on the drop down menu is supposed to be white font.

    The code I used to accomplish this is:

    .nav-menu .current-menu-item a,
    .nav-menu .current-menu-parent a
    
     {
     color: #00ff00 !important;
    }

    I have tried to play with the two classes by removing one or the other and it does not work.

    I appreciate any help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Matt Knowles

    (@aestheticdesign)

    Your submenus don’t have any color properties, so they’re inheriting it from the parent.

    You need to target the submenus with something like:

    .nav-menu .current-menu-item a {
    color: #00ff00;
    }

    .nav-menu ul.sub-menu a {
    color: white;
    }

    If you leave the !important on there it’s going to overide the sub-menu rule.

    Thread Starter chrisbabayans

    (@chrisbabayans)

    I implemented the code and it works better to meet the needs of my client than what was previously there.

    If the page that is open is in a submenu, it is italic. Is there any way to make this #00FF00 as well?

    Matt Knowles

    (@aestheticdesign)

    Around line 934 of your style.css you’ll see the area that it adds the italic.

    Add this line to change the color:

    .color #00FF00 !important;

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘When an item on the drop down menu is selected, the entire menu changes color.’ is closed to new replies.