Site logo

[Support request] How I can Add a Border Around an Image?

Home Forums Support [Support request] How I can Add a Border Around an Image?

Home Forums Support How I can Add a Border Around an Image?

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2054742
    Dev

    Hello,

    Please see the below screenshot.

    http://prnt.sc/23qf0nr

    I want to add such type of border around my images, how can I do that?

    Please let me know.

    #2054849
    Leo
    Staff
    Customer Support

    Hi there,

    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 🙂

    #2055110
    Dev

    Hello,

    I have added the sites in the private box.

    Please let me know.

    #2055118
    Elvin
    Staff
    Customer Support

    Hi there,

    Will the border only be for the images inside the content area?

    If so, you can add this CSS:

    .entry-content img {
        border: 5px solid black;
    }
    #2055140
    Dev

    Thanks. Would you please tell me where I have to add this CSS code?

    Do I have to enter it manually in each post?

    #2055146
    Elvin
    Staff
    Customer Support

    Thanks. Would you please tell me where I have to add this CSS code?

    Do I have to enter it manually in each post?

    You can add it on Appearance > Customize > Additional CSS. 😀

    #2055185
    Dev

    Hello,

    I added that CSS in the Appearance > Customize > Additional CSS. But that didn’t add any border around my images.

    Check the private box u will see no border on the page.

    #2055200
    Elvin
    Staff
    Customer Support

    I see you’re using a caching plugin. Can you try clearing your cache so it generates a new one including the latest CSS addition?

    #2084145
    Dev

    Hello,

    I have added the below CSS to add borders around my post images.

    .entry-content img {
    border: 5px solid black;
    }

    But I don’t want a border on the image shown in the screenshot. So please check the below screenshot link.

    https://prnt.sc/26f2f92

    I have added my site URL in the private box.

    #2084220
    David
    Staff
    Customer Support

    Hi there,

    edit that Image Block and in Advanced > Additional CSS Class(es) add: no-img-border

    Then add this CSS:

    .entry-content .no-img-border img {
        border: none;
    }
    #2084441
    Dev

    Hello,

    Can you please tell me where I have to add the below CSS code

    #2084454
    David
    Staff
    Customer Support

    So this is the combined CSS:

    .entry-content img {
        border: 5px solid black;
    }
    .entry-content .no-img-border img {
        border: none;
    }

    And you can add that in Customizer > Additional CSS at the very top.

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