Good day everyone! can someone please explain to me what is happening to the box-shadow in my image? here’s the link: https://codepen.io/kymalcansadoape/pen/MWmRmPB?editors=1100
Can you be a little clearer with your question?
The use of inset
is a bit unusual unless the style you are going for requires it.
I’m confused cause the shadow is larger than picture. I think it follows the original size of the picture.
I’m guessing you mean the result of the padding-top
you have on the element?
Hi
Box-shadow inset will not work on image, you need to create a div and give box-shadow to that div and put image inside that div. You can also use a negative z-index on the img element, and use the box-shadow with inset value on the div element.
Refer the below link for the various ways to use box-shadow with image.
I hope this helps
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.