I’m trying to get an effect like an inset drop shadow effect in CSS that looks like the following image:

(source: gyazo.com)
Does any body know how I can get that effect with CSS?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The answer has already been given to you (
box-shadow: inset ..), so here’s a quick demonstration of how it could work:http://jsfiddle.net/L6nJj/
The important part is
box-shadow: inset 2px 2px 3px 0 red.For an explanation of the available options: https://developer.mozilla.org/en/css/box-shadow#Values
Be sure to take into account the browser support for
box-shadow, which is that it doesn’t work in older versions of IE, but works “everywhere” else: http://caniuse.com/css-boxshadow