1

Possible Duplicate:
Can you add a non-square drop shadow to PNG content with CSS?

Thanks for checking out my question.

Having an issue where by I am setting the hover of an image in css to have a box-shadow: example

But the shadow is a square around the image, rather than following the path around the guy in the picture.

The image is a PNG-24 with a transparent background. Am I making a stupid mistake somewhere? Can this actually be done or do I need to somehow remove the square canvas from within Photoshop or swap out the image for the same one with a shadow via javascript?

Many thanks for any suggestions :)

Community
  • 1
  • 1
Christian
  • 167
  • 3
  • 13

1 Answers1

9

its not possible with CSS. Use image sprite & change background position on hover.

Here is the working fiddle

SVS
  • 4,245
  • 1
  • 23
  • 28