Archived topic
CSS doesn't work on post (custom post - CPT UI)
4 replies · Started by Tom on January 4, 2022
Hi
The box-shadow CSS doesn't work on custom post (Use the plugin Custom Post Type UI). I am very sure the CSS code is right & it works on regular post(WP core)
.single-post .entry-content img {
border: 1px solid #000;
box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
I am using the CSS plugin Simple CSS.
Could I get a help?
Thanks
But the CSS code do works after putting it in Customize.
Gutenberg blocks: DIV + CSS
.test {
border: 1px solid #000;
box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
I re-test the CSS code with Simple CSS plugin again.
Below CSS(DIV+CSS) works in Simple CSS along with a post(Works in Both normal post and CPT UI post) :
.test {
border: 1px solid #000;
box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
I want all the images in a post(CPT UI) have box-shadow with below code. The code just doesn't work.
It's strange that it do work if I apply above CSS code to a normal post.
.single-post .entry-content img {
border: 1px solid #000;
box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
But it just doesn't work.
I found solutions in this page: https://wpsites.net/genesis-tutorials/add-box-shadow-effect-images/
I just changed a CSS code to add box-shadow for all images in a post.
It works now.
Thank you anyway!
Glad to hear you found an answer!