Archived topic
How I can Add a Border Around an Image?
11 replies · Started by Dev on December 20, 2021
Hello,
Please see the below screenshot.
I want to add such type of border around my images, how can I do that?
Please let me know.
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 :)
Hello,
I have added the sites in the private box.
Please let me know.
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;
}
Thanks. Would you please tell me where I have to add this CSS code?
Do I have to enter it manually in each post?
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. :D
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.
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?
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.
I have added my site URL in the private box.
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;
}
Hello,
Can you please tell me where I have to add the below CSS code
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.