[Resolved] Adding border around images and not including caption area

Home Forums Support [Resolved] Adding border around images and not including caption area

Home Forums Support Adding border around images and not including caption area

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #821583
    Ethan

    I’m seeking to add a simple border around all images (site wide, but mostly affects pages). I did figure out how to, by adding the following CSS:

    .my-img-border {
    border: 2px solid #000000;
    }

    As well as adding my-img-border to the Advanced area for the image.

    However, there seems to be extra padding at the bottom of the image that the border goes around, seemingly the area where the caption is, even though I don’t put any text in for a caption. So the result is a white area below the image, with the border around it.

    Is there a better way to add a border to an image that doesn’t include the caption area? Alternatively, I guess I could remove the caption area, but I’d like to avoid PHP if possible.

    GeneratePress 2.2.2
    GP Premium 1.7.8
    #821600
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the site in question?

    You can edit the original topic and use the private URL field.

    Let me know ๐Ÿ™‚

    #822681
    Ethan

    The site is not public yet. I submitted log in information through the Account Issue contact page.

    An example of a photo with a black border, with the extra white space at the bottom (which I presume is the caption area), can be found on the Vocabulary page.

    #822717
    Leo
    Staff
    Customer Support

    Edit your CSS to this:

    .my-img-border img {
        border: 2px solid #000000;
    }
    #822781
    Ethan

    Thank you! Perfect as usual!

    #822795
    Leo
    Staff
    Customer Support
    #1466129
    Laura

    Forgive this. Probably under my nose. But I can’t find where to do anything to regular post photos, like a border.

    #1466134
    Elvin
    Staff
    Customer Support

    Hi Laura,

    Can you open a new topic for your own concerns/questions?

    Thank you. ๐Ÿ™‚

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

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