Archived topic
Image customization
5 replies · Started by Jitendra on February 24, 2022
Dear sir/Mam
I want to add shadow to my all image. What i have to do for it?
Hi there,
are you wanting ALL images ? Or just the featured images and images inside your posts ?
all the image
Hi Jitendra,
If you wish to add shadow to all images, you would need a custom CSS code for that.
Here is a sample code that targets all images:
img {
box-shadow: 12px 12px 2px 1px rgba(0, 0, 255, .2);
}
Moreover, if you wish to add a shadow solely to a specific image only, you may add a class to the Image element or whichever element, and use that as the selector for your code.
See: https://share.getcloudapp.com/nOu9GJRK
The code to apply a shadow to your custom class would be:
.add-my-shadow {
box-shadow: 12px 12px 2px 1px rgba(0, 0, 255, .2);
}
Kindly replace add-my-shadow to your class name. :)
Reference to box-shadow: https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow
Here is an article with regards to adding custom CSS: https://docs.generatepress.com/article/adding-css/
On the other hand, if the image is not an Image block but a background image to a container, you would need to set the shadow to the container itself.
If you’re using GenerateBlocks Pro, you can do it as such: https://share.getcloudapp.com/Z4u1O2DZ
Hope this helps! :)
sir another things i want to know how can i fixed the last sidebar block
Hi there,
please raise a new topic for each unrelated question, so this one can be marked as resolved