Archived topic
Adding border around images and not including caption area
7 replies · Started by Ethan on February 25, 2019
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.
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 :)
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.
Edit your CSS to this:
.my-img-border img {
border: 2px solid #000000;
}
Thank you! Perfect as usual!
Glad I could help!
Forgive this. Probably under my nose. But I can't find where to do anything to regular post photos, like a border.
Hi Laura,
Can you open a new topic for your own concerns/questions?
Thank you. :)