• Hello, I am tweaking this Whitelight site:

    https://thrivetherapeutics.ca/

    and have added some custom CSS to get the custom green color in the navigation font and backgrounds on hover and dropdown, but when you click on a page from the navigation (say Classes) the static background color of that button retains the original blue color.

    I don’t want that.

    Can someone provide the custom CSS to alter the static background color of the selected navigation button?

Viewing 2 replies - 1 through 2 (of 2 total)
  • WordPress uses “current-menu-item” on the li container of the current page link.

    So click on classes, the current page link is now classes, so the li element holding that link is given the class “current-menu-item”

    so to give it the desired background add this to the section of css that you used for the hover.

    Instead of:

    #navigation .nav li:hover > a {
    background: #8ec83e;
    }

    Try Using

    #navigation .nav li:hover > a, #navigation .nav li.current-menu-item > a {
    background: #8ec83e;
    color: #ffffff!important;
    }

    .current_page_item a{background:transparent !important;}

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Navigation button background color for viewed page’ is closed to new replies.