current_page_item in nav menu > CSS issue

  • Author
    Posts
  • #40948

    Hello everyone !

    Website : http://skadi-web.fr
    Theme : Nirvana
    Relevant plugins : Page scroll to id, Sticky Menu (or Anything!) on Scroll

    I have a little problem with my nav bar that I don’t really understand nor know how to fix : my website hass only 2 pages : the main page, a scrolling page with 4 anchors, and the “legal notice” page. My nav bar has 4 entries, referring to my 4 anchors. So, if I want my links to work from the “legal notice” page, I need my entries to link to the full path of my anchors, something like : http://skadi-web.fr/#section2.
    The thing is, those entries have specific CSS classes li.current_page_item and li.current-menu-item, which, I suppose, are meant to have some visual effect to indicate the “current” page. But on my main page, ALL the entries have this classes, disabling the normal css effects of entries.
    If As it is not very clear, I invite you to check my [website], you will see that nav bar has no hover effect, and background of li are different from the bar itself. The “legal notice” is not part of the nav bar, it is a link on the footer, on the text “Mentions légales”.

    So, I think this is a WordPress issue, but is there any way to remove the background-color from nirvana ? A fix that would not be erased by an update ?

    Thanks for reading so far, and thanks in advance for any help you can provide !

    #40968
    Zed
    Cryout Creations mastermind

    You could use custom styling to remove the current-page accent in the theme:

    body #access ul > li.current_page_item, body #access ul > li.current-menu-item, 
    body #access ul > li.current_page_ancestor, body #access ul > li.current-menu-ancestor {
        background-color: inherit; 
    }

    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #41011

    It is working indeed, but I had to redefine the :hover CSS (nothing big).

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘current_page_item in nav menu > CSS issue’ is closed to new replies.