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

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

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

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
    Staff
    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.

    #1447788
    Jose

    Sure, please see the underlined picture link

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

    Thank you

    #1447797
    Elvin
    Staff
    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.

    #1448121
    Jose

    it works perfectly

    thank you Elvin

    #1449124
    Elvin
    Staff
    Customer Support

    Nice one.

    No problem.:)

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