Archived topic
Image shadow effect only in one specific post
5 replies · Started by Sanu Kumar on August 18, 2021
How to add Image shadow effect only in one specific post. Suppose this post: https://masteryblogging.com/semrush-free-trial/.
I want to add an image shadow effect in that specific post only. (no featured image)
Hi there,
I'm not sure I fully understand what you mean.
Can you specify which part(image) of the page do you want to add shadow effects on?
Do you want to add it on all images on the post?
If so, try playing around with this CSS.
body.postid-7344 .entry-content img {
box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%) !important;
}
Yes, this is what I'm looking for. Thank you very much, Elvin.
In addition to this, If I want to add more post (id) then how can I do this?
You add more selectors.
Example:
body.postid-7344 .entry-content img,
body.postid-1234 .entry-content img,
body.postid-5678 .entry-content img {
box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%) !important;
}
Thanks
No problem. :D