Site logo

Archived topic

CSS hyperlink style covering buttons/social media icons

3 replies · Started by Mark on July 9, 2020

Viewing posts 1–4 of 4

Hi guys.

I applied some CSS which you kindly helped me with, Here is the CSS.

.entry-content a {
background-image: linear-gradient(180deg,#fff06b,#fff06b);
background-repeat: no-repeat;
background-position: 4px bottom;
background-size: 100% 10px;
   text-decoration: underline;
}

Is there a way to turn it off for buttons inside of posts and any social media icons. It seems to be underlying everything rather than just links inside of the body.

Hopefully, this makes sense.

Kind regards

Mark

Hi there,

It's difficult to exclude certain links using that CSS unfortunately.

The best solution would be to add a class like link-underline to the links that you actually want underline, then edit the CSS to this:

.entry-content a.link-underliune {
    background-image: linear-gradient(180deg,#fff06b,#fff06b);
    background-repeat: no-repeat;
    background-position: 4px bottom;
    background-size: 100% 10px;
    text-decoration: underline;
}

Thank you I will try this.

No problem :)

This archived topic is closed to new replies.