[Resolved] Link Style – how to remove underline in pictures

Home Forums Support Link Style – how to remove underline in pictures

  • This topic has 5 replies, 2 voices, and was last updated 4 months ago by Elvin.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1447773
    Jose

    Hi,

    I’m using this custom CSS to underline links in the content. It works perfectly.

    .entry-content a {
        border-bottom: 2px solid #1e73be;
    } 

    However, the images that are linked to a bigger version of themselves have now the image underlined
    Any way to apply this underline to only the text in the content?

    Thank you

    #1447784
    Elvin
    Customer Support

    Hi,

    Can you provide us a link to your site to take a closer look?

    It’ll help a lot as we can see the page to identify the most suitable CSS selector to apply your styling.

    A wise man once said:
    "Have you cleared your cache?"

    #1447788
    Jose

    Sure, please see the underlined picture link

    https://www.iartificial.net/correlacion-covarianza-ibex35/

    Thank you

    #1447797
    Elvin
    Customer Support

    Thanks.

    Perhaps this CSS code is the better approach as this only targets texts regardless of what’s inside the anchor links tag.

    .entry-content a {
        text-decoration: underline;
    }

    But if you really prefer the border-bottom approach, you can exclude the links with images inside by trying this.

    figure.wp-block-image > a {
        border: none;
    }

    Let us know if it works for you.

    A wise man once said:
    "Have you cleared your cache?"

    #1448121
    Jose

    it works perfectly

    thank you Elvin

    #1449124
    Elvin
    Customer Support

    Nice one.

    No problem.:)

    A wise man once said:
    "Have you cleared your cache?"

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