Site logo

Archived topic

underline links on post only

15 replies · Started by Tony on May 29, 2021

Viewing posts 1–15 of 16

hi gp,

i want to underline links on my blog post content in the paragraphs only with a colour of my choice.

can you help please?

thanks Leo,

that works just fine, and I assume the links will only be underlined on my blog posts correct?

also, how do i make the line underneath thicker?

Leo,

i just noticed that the above css applies to a button also, which i don't want, only the content excluding buttons or anything else on the website outside of blog post content.

can we amend the css please?

Hi Tony,

You can try this CSS instead, feel free to change the 3px.

body.single-post .entry-content a:not(.button):not(.gb-button) {
    border-bottom: 3px solid #333;
    padding-bottom: 3px;
}

thanks Ying,

how do i create border padding?

i don't want the border to be too close to the text and not readable.

thanks in advance.

hi Ying,

the underline still appears on the button link....see blog post on baby bouncer, scroll at the bottom and you'll see it.

use temp login link.

again, works perfectly, thank you very much.

You are welcome :)

Hi. I used this same css code and it worked for me. However, the underline appears on my linked images (from Amazon). Is there anywhere to remove the line please? Thanks a lot.

Hi there,

try this method, it should apply only to links that are direct children of a paragraph - which hopefully amazon links are not.

body.single-post .entry-content p > a:not(.button):not(.gb-button) {
    border-bottom: 3px solid #333;
    padding-bottom: 3px;
}

If its still an issue, raise a new topic where you can access the Private Information field to share a link to your site and we can take a look.

Thanks David. It worked but now, it's removed the underline from most of my regular hyperlinks? How can this be fixed please?

Can you raise a new topic and share a link to a post so i can see what we're working with ?

Thanks, David, I've created a new topic.

This archived topic is closed to new replies.