Site logo

Archived topic

Link styling for content ONLY

7 replies · Started by Milo Lam on December 22, 2021

Viewing posts 1–8 of 8

Hi,
I'm trying to do something like this

/*link styling */
.entry-content a {
	border-bottom: 3px solid #5bc1ae;
}

but how do I target it just for my blog content and not every single link on the page?

Thank you.

Hi Leo,
Just shared it. As you can see, the main call to action on the homepage gets underlined as well. Thank you

Hi Milo,

You can try this:

/*link styling */
.single-post .entry-content a {
	border-bottom: 3px solid #5bc1ae;
}

Thanks, Ying. Seems to work by confining it to just blog entries now, but any idea how I can also exclude the underline for the social sharing buttons in the blog posts? Thanks again

Are the links usually in paragraph?

If so, try to change the selector to .single-post .entry-content p a .

Let me know if that works for you :)

That did the job. Thanks a lot. GP team is helpful as always

You are welcome, glad to help!

This archived topic is closed to new replies.