Site logo

Archived topic

Removing underlines from linked images

3 replies · Started by Rob on May 8, 2020

Viewing posts 1–4 of 4

Hi there, GP Team!

I have customised my hyperlinks using the following CSS:

.single .entry-content a {
text-decoration:none;
border-bottom: 1px solid #7bdcb5;
box-shadow: inset 0 -1.5px 0 #7bdcb5;
transition: background 0.1s cubic-bezier(.33,.66,.66,1);
}

.single .entry-content a:hover {
text-decoration:none;
border-bottom:none;
box-shadow:none;
}

And image captions have been excluded with this:

.single .entry-content figcaption a {
border: unset;
box-shadow: unset;
}

However, when I add a URL to an image within a post, I can see the customised hyperlink underline at the bottom of the image, which looks a bit ugly. Is there a way to remove this without affecting the rest of the customisation?

Many thanks in advance.

Rob

Hi there,

you're last CSS rule where you unset the style for figcaption you can change to:

.single .entry-content  figcaption a,
.single .entry-content figure a {
    border: unset;
    box-shadow: unset;
}

David,

You, Sir, are a legend!

Thank you so much for your help and wish you a great weekend.

Rob

Glad to be of help.
Have a great weekend too.

This archived topic is closed to new replies.