How to keep current menu item highlighting when on a child page which is exclude (4 posts)

  1. geemoney1985
    Posted 2 years ago #

    This is the problem. I have menu-item "products" and I have sub pages of this with different categories. These I have excluded from the menu so they arent visible or accessible without clicking on the link under products. But when I do click on a product category and goes to that page, the current menu item highlighting of Product goes away of course. How can I fix this?

  2. geemoney1985
    Posted 2 years ago #

    i found a way to edit it a bit anyways like this: .current-page-ancestor a { text-decoration:underline; font-weight:bold; text-shadow: 2px 2px #403F40; text-decoration:underline; } although the underline disappears, why? The text get bigger and bolder but the underline is not working and i tried to have it first and last but no difference. The CSS attributes is a copy from my current menu item-styling so it should be the same?

  3. Andrew
    Moderator of Puppies
    Posted 2 years ago #

    Post a link to a working example of the issue, otherwise it's too time consuming for volunteers to debug a hypothetical CSS issue.

  4. geemoney1985
    Posted 2 years ago #

    The issue is solved by adding this to your css:
    .current-page-ancestor a { yourpersonalcsssettingsforcurrentmenuitem }

    but keep in mind that old css-settings and another rule might have a higher priority (the last definition is the one that is being used) can override what you trying to do. To be sure that its really whats beeing used, paste it at the very bottom of your .css and you might wanna find and delete whats not being used anyway.

Topic Closed

This topic has been closed to new replies.

About this Topic