Site logo

Archived topic

CSS help needed

1 reply · Started by Orlando on January 31, 2019

Viewing posts 1–2 of 2

I'm trying to use a CSS gradient on links (on hover), so far I'm using this:

.entry-content a:not(.button):focus, a:not(.button):hover,
li:not(.main-navigation):hover {
    background: -webkit-gradient(linear,left top,right top,from(#ff8a00),to(#da1b60));
    background: linear-gradient(to right,#ff8a00,#da1b60);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    text-shadow: none;
    text-decoration: underline;
}

It's working but it affects the menu. What class do I need to use to avoid affecting the menu? working on WordPress 5.0.3.

Thanks in advance.

Hi there,

Instead of:

li:not(.main-navigation)

Try this:

li:not(.menu-item)

This archived topic is closed to new replies.