Trying to highlight current page in menu

Asked on October 16, 2016 in How To.
Answered

Hi there

On this site: http://lenadoesyoga.com I am trying to highlight the current page in the menu to be the same color as when you hover.

I have added this custom CSS but it isn’t working:


.nav-horizontal .current-menu-item a{

color: #e74c3c;

}

As far as I can tell, I am following the instructions from here: https://docs.layerswp.com/doc/wordpress-how-to-customize-menu-links-color-or-style/

Any help would be greatly appreciated – thanks!!

-Robin

robin Layers User
Reply
  • Possible Answers to Your Question:

  • 1 Answer(s)
    Answered on October 19, 2016. Best answer

    Hi Robin ,

    Try this code  :

    
    .header-site.invert .nav-horizontal li.current_page_item > a,
    
    .header-site .nav-horizontal li.current_page_item > a {
    color: #e74c3c;
    }
    
    

    Hope this helps 🙂
    -Dieter

    Brilliant – thank you!!! It worked! 🙂

    on October 20, 2016.
    Reply