Archived topic
Border on images used in posts only?
5 replies · Started by Paul on October 6, 2021
Hi There,
I'm using the following CSS to add a border to all images but ideally, I want to add the border to ONLY images that exist within post content. Is it possible to do this with an existing class?
/* Adding border to images */
.wp-block-image img {
border: 10px solid rgba(92,121,255,0.5);
}
Thank you
Paul
Hi there,
change your CSS selector from: .wp-block-image img to: .entry-content .wp-block-image img
Thanks, David! That seems to have worked although there is one image on the home page that still has the border? Any ideas why?
If its just the Single Post you want them applied to use:
.single-post .entry-content .wp-block-image img
Perfect! Thank you!
Glad to be of help