Site logo

Archived topic

Off-Canvas color hover problem

5 replies · Started by russel on January 18, 2023

Viewing posts 1–6 of 6

Hi there,

its because the menu item is a parent item for that post eg. a post within the same category.
by default WP will give the menu item a current-menu-* class because of that relantionship, which attracts the current menu item styles.

If you want a current menu item to have a hover style add this CSS:

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

Thank you.

While you're at it, is it possible to add an underline while on hover as well?

Here you go:

.slideout-navigation.main-navigation .main-nav ul li:hover > a {
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 3px;
    text-decoration-color: #000;
}

I included the other properties for you to play with

Great! Thank you! :)

You're welcome

This archived topic is closed to new replies.