Archived topic
Create Frame / Border around Image
5 replies · Started by Travel2Mania on November 22, 2021
Hey Guys.
I'm trying to place a border around specific images on specific pages(not all pages) sililar to the below page I have:
https://www.travel2mania.com/wrestlemania-travel-packages (FYI WP Pages are local at the mo)
I have the below from other forums but cant get this to work, can you assist please?
.single-post .entry-content IMG {
border: 5px solid;
border-color: #EDCD1F;
padding: 5px;
box-sizing: border-box;
}
Hi there,
The code looks like it should work.
We would need to see the site live with the CSS added in order to determine why it's not working for you.
You can use the private URL field to provide the info:
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let me know :)
Hey Guys, I reverted to using the below code to get a border around the image
Name the Image block Additional CSS class(es) to crg-image-border
.crg-image-border {
border: 5px solid #EDCD1F;
}
But this actually places a border around the container, and not the image itself, How do I get the border around the image instead?
FYI - site is still local
https://drive.google.com/file/d/10CCQOM7Rka_Iz2TALCwmgW-L6gHmPrqM/view?usp=sharing
Give this CSS a try, but without seeing the live site, it's just pure guessing, not sure it's gonna work:
.crg-image-border img {
border: 5px solid #EDCD1F;
}
Good guess Ying
Worked exactly as needed
Great :)