[Resolved] Menue error: Ancor Page versus Single Page

Home Forums Support [Resolved] Menue error: Ancor Page versus Single Page

Home Forums Support Menue error: Ancor Page versus Single Page

  • This topic has 17 replies, 3 voices, and was last updated 6 years ago by Leo.
Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #453844
    Bjoern Christian

    Hello,

    we do have a Problem: our side consists of a menue leading to an ancor within a large top to down page. But we do also have some single pages (Projects f.e.) that Show up a content outside the ancor page. The Problem:

    If we are within the ancor page, the mouseover-highlightening of the menue is working only for the single page menue entries. If we are within a single page the highlightening works only for the menue entries leading to the ancor page.

    What could this be?

    #453845
    Leo
    Staff
    Customer Support

    Hi there,

    Can you provide a link to your site?

    #453927
    Bjoern Christian
    #454160
    Leo
    Staff
    Customer Support

    If I understand you correctly, you want to set a hover color for current menu items?

    If so try this CSS:

    .main-navigation .main-nav ul li[class*="current-menu-"] > a:hover {
        background-color: #000000;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know.

    #454671
    Bjoern Christian

    Hello,

    plkease take another look at the Problem: hover Color works on the entry page for the two menue items “Downloadbereich” and “Jobs”. But not for the Rest. If you are inside Jobs it works for the rest biut not for the two allready mentioned entries.

    The difference: the menue items “Downloadbereich” and “Jobs” target to an external site or (“Jobs”) to a single page. The other menue items lead to an anchor within the large “one page design”…

    #454673
    Bjoern Christian

    Another effect: if you click on the Impressum (bottom of the side) or on Datenschutz, highlighting works fine.

    #454866
    Leo
    Staff
    Customer Support

    Did you try my CSS? I’m not seeing it being added?

    #551938
    Rolandas

    Hi

    It works great on the main menu items, but not on sub-menu items.
    I want to set a hover color for current sub-menu items too.
    What CSS should be written for sub-menu?

    #552100
    Leo
    Staff
    Customer Support

    Hmm it should work for sub menu as well.

    Can you link me to your page with the CSS added?

    #552354
    Rolandas
    #552826
    Leo
    Staff
    Customer Support

    Try this for the overall CSS:

    .main-navigation .main-nav ul li[class*="current-menu-"] > a:hover
    .main-navigation .main-nav ul ul li[class*="current-menu-"] > a:hover {
        background-color: #b72029;
        color: #ffffff;
    }
    #552852
    Rolandas

    I tried it. Then it does not work, either at the main or sub-menu.

    #552870
    Rolandas

    Then somehow I tried with “! Important”.
    And it worked.

    .main-navigation .main-nav ul li[class*="current-menu-"] > a:hover {
        background-color: #b72029 !important;
    	color: #ffffff !important;
    }
    #552908
    Leo
    Staff
    Customer Support

    Yeah it was probably getting over written.

    Try this if you don’t want to use !important:

    body .main-navigation .main-nav ul li[class*="current-menu-"] > a:hover,
    body .main-navigation .main-nav ul ul li[class*="current-menu-"] > a:hover {
        background-color: #b72029;
        color: #ffffff;
    }
    #552945
    Rolandas

    Not work, either at the main or sub-menu.

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