Archived topic
Link styling for content ONLY
7 replies · Started by Milo Lam on December 22, 2021
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 there,
Your code should target the blog post content only already.
Any chance you can link us to the site in question?
You can use the private information field:
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let me know :)
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!