[Resolved] Link styling for content ONLY

Home Forums Support [Resolved] Link styling for content ONLY

Home Forums Support Link styling for content ONLY

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2057161
    Milo Lam

    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.

    #2057207
    Leo
    Staff
    Customer Support

    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 ๐Ÿ™‚

    #2063354
    Milo Lam

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

    #2063386
    Ying
    Staff
    Customer Support

    Hi Milo,

    You can try this:

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

    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

    #2063396
    Ying
    Staff
    Customer Support

    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 ๐Ÿ™‚

    #2063403
    Milo Lam

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

    #2063409
    Ying
    Staff
    Customer Support

    You are welcome, glad to help!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.