[Resolved] Problems with Mouseover in Primary Menu

Home Forums Support [Resolved] Problems with Mouseover in Primary Menu

Home Forums Support Problems with Mouseover in Primary Menu

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2157498
    Samuel

    I have set a color for the mouseover in the primary menu. If I insert a static page into the menu, it works fine (See AGB). On mouseover the purple comes. But if I set an individual link with an anchor (for example https://url.de/#anchor), then I don’t get this mouseover effect (all other links).

    #2157533
    Fernando
    Customer Support

    Hi Samuel,

    The other menu items are links from the current page, and to alter the colors of the Primary Nav for links as such, you would need to change the last column in Appearance > Customize > Colors: https://share.getcloudapp.com/NQuNvL9J

    You’ll see this behavior in the AGB Page, where the current-page is AGB, thus following a different color value from the customizer: https://share.getcloudapp.com/X6uEDqLW

    Hope this clarifies. 🙂

    #2157856
    Samuel

    Hi Fernando,

    thanks, this is what i have: https://www.screencast.com/t/YmIg8cD3em2

    So the current color should be neutral right? When i am at the home page the mouseover still not work. Only at the site AGB.

    #2157864
    Samuel

    the big goal is this: i want to link to anchor from the main menu. So I could also just put “#kontakt” in the link target. Then I wouldn’t have the mouseover problem anymore. BUT: then I have another problem. Assuming I’m on another page, the anchor doesn’t work properly anymore. The anchor is only on the start page. Is there a better solution?

    #2158149
    David
    Staff
    Customer Support

    Hi there,

    do you want no Current background color ? For any items ? Let me know as we will need to use some CSS to overcome the current-menu-item colors.

    #2158158
    Ying
    Staff
    Customer Support

    Hi Samnuel,

    Try this CSS:

    .main-navigation .main-nav ul li[class*="current-menu-"]:hover > a, .main-navigation .main-nav ul li[class*="current-menu-"]:focus > a, .main-navigation .main-nav ul li.sfHover[class*="current-menu-"] > a {
        color: var(--accent);
    }
    #2158826
    Samuel

    Hi David and Ying.

    Perfect!

    Only one } is missing. THANKS!!

    .main-navigation .main-nav ul li[class*="current-menu-"]:hover > a, .main-navigation .main-nav ul li[class*="current-menu-"]:focus > a, .main-navigation .main-nav ul li.sfHover[class*="current-menu-"] > a {
        color: var(--accent);
    }
    #2159346
    Ying
    Staff
    Customer Support

    Oops, sorry there’s actually one { too much not missing 🙂

    I updated the CSS here:
    https://generatepress.com/forums/topic/problems-with-mouseover-in-primary-menu/#post-2158158

    #2159355
    Samuel

    Thanks!!!

    #2159363
    Ying
    Staff
    Customer Support

    You are welcome 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.