This webapp takes 8 images of alpha-transparent shadow and makes up a ready to use CSS/HTML box. (source code)
The blue squares on the image below show how you need to cut out your shadow.
Note: width of top and bottom pieces as well as height of left and right pieces do not matter and do not have to match; 5px is a good value to use.
You can use this webapp and you can download source code and modify anything in anyway you want. I am not responsible for anything whatsoever; if something happens - it isn't my fault
Created by Zoffix Znet