Drop Shadows on Featured Images
-
I have an archive page that shows, for each post, a featured image and the post title. I’d like to apply a drop shadow to the featured image. I’ve tried a few different ways: (1) Editing the Styles -> Block -> Featured Image -> Additional CSS (this would be global); (2) Adding a selector that adds the drop shadow and applying that selector on my archive page to the featured image, then adding CSS to add the drop shadow.
I do manage to get the drop shadow, but… The featured images are of various sizes and are scaled to appear 200×200 pixels (“Contain”), so that for images that aren’t square the drop shadow appears around the 200×200 space rather than around the image itself. That is, there’s a white margin around either the horizontal or vertical side of the image that shadow includes.
I’ve tried playing with the CSS selectors to only target the image, but haven’t found the trick. Any suggestions appreciated! (Or, if I’m going about this all the wrong way, please let me know!). Thanks.
- The topic ‘Drop Shadows on Featured Images’ is closed to new replies.