Site logo

Archived topic

Link Background-color

5 replies · Started by guyhanchet on March 9, 2021

Viewing posts 1–6 of 6

I have managed to make a bit of a mess and I don't know how to undo it. Please help.

I wanted to make links more prominent in the body of the site so when I couldn't find out how using standard features of GeneratePress, I tried a bunch of things using Simple CSS. One of the things I tried was setting with something like this a:hover {background: #00ff00; } (that wasn't the color). I messed it up with a CSS selector that even changed the behavior of the menus and I didn't like it anyway so I removed all the CSS that I could find. The menus now behave correctly but every other link has the undesired hover behavior, even the Social Icons in the header.

Please help me undo the damage that I have done.

Also an explanation of how I could tinker with CSS that would only change what I wanted to change (links in the body only) would be helpful.

You can see the problem on the website https://forourgrandchildren.ca.

Your help to recover from my incompetence would be greatly appreciated.

Hi there,

Try changing this CSS you've added:

a:hover {
    background-color: #00D084;
}

To:

.entry-content a:hover {
    background-color: #00D084;
}

This would target the links in the content only.

Let me know if this helps :)

Thanks, that helps, I have corrected the immediate problem, but I am still mystified.

I have now included the CSS below and am able to control all the links that I noticed that were misbehaving. But my question is really why, when there is no CSS anywhere, has the default become to display a green background even on the social media widgets in the header. Why do I need to override the hover behaviour just to get it back to what I thought was the default (no background on hover.

.entry-content a:hover,
.widget a:hover
{
background-color: inherit;
}

Thank you. That was exactly the problem.

Glad to help :)

This archived topic is closed to new replies.