Your message in English…
“I need help to apply a css filter through an attribute to an image, but not to the border of the image, but to the shape that includes the image. I don’t understand code. They have told me that it is with this code but I apply it and I do not see the changes: filter: drop-shadow(0px 0px 8px #ed3eef). It won’t let me attach the example screenshots I have.
Thank you very much, regards”
You can try this css generator to see if it makes sense. I don’t understand how you are expecting the shadow on the image but not the border. Maybe you don’t really want a drop shadow but something else. https://webcode.tools/generators/css/drop-shadow
Maybe if you can give a link to your image as it appears on the page it will help in understanding.
-
This reply was modified 1 year, 7 months ago by janet4now.
No me deja adjuntar las capturas de ejemplo que tengo.
The forums do not host images, so you cannot attach images to topics. However, you can upload your image to any public image hosting service like imgur.com or similar. Then just provide the resulting link here.
This is incomplete:
filter: drop-shadow(0px 0px 8px #ed3eef)
It needs selectors to be applied, for example:
img {filter: drop-shadow(0px 0px 8px #ed3eef);}
This applies drop shadows to all images, which is not what you want. It’s just an example. For us to suggest appropriate selectors for what you do want, we’d need a live link to an example page. An additional link to a mock up illustration of what you want to achieve would also be useful.
Hello,
I have managed to set the filter with the following code:
img {filter: drop-shadow(0px 0px 8px #ed3eef);}
but it applies to all the images on that page, I only need it on a specific image.
You’ll need to share a link for us to help you, or add a class to your image and then add it to your css code. Try following this as it goes through adding a class to your image and applying css:
https://www.wpbeginner.com/beginners-guide/how-to-add-a-border-around-an-image-in-wordpress/
-
This reply was modified 1 year, 7 months ago by janet4now.
Hello,
What I mean is if I can put:
img {src=”xxxxx.png”; filter: drop-shadow(0px 0px 8px #ed3eef);}
I do it like this but it doesn’t work
no, that doesn’t work. Take a look at the link I gave you that explains about adding classes.
Hello,
With those changes in the manual it doesn’t work, it works as @bcworkz told me but it applies it to all the images.
Best regards,
Yes, the code he gave you is correct, but you need to add a class to have it work ONLY on the image you want to target. The link was to show you how to add a class. If you don’t share your page with this image we can’t help you, sorry.
-
This reply was modified 1 year, 7 months ago by janet4now.
Hello,
I think I’ve solved it, thank you very much!