Reputation: 1149
I have a box of content and need to give a shadow for that. But I want to give a shadow for the bottom of the box only. I used this css box-shadow: 0 3px 5px #000000;
If I give this code it shows left, right, and bottom. I need the bottom only
Can anyone suggest how to solve this one? Thanks a lot
Upvotes: 35
Views: 165779
Reputation: 161
Specify negative value to spread value. This works for me:
box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1);
Upvotes: 1
Reputation: 92745
You have to specify negative spread
in the box shadow to remove side shadow
-webkit-box-shadow: 0 10px 10px -10px #000000;
-moz-box-shadow: 0 10px 10px -10px #000000;
box-shadow: 0 10px 10px -10px #000000;
Check out http://dabblet.com/gist/9532817 and try changing properties and know how it behaves
Upvotes: 15
Reputation: 9576
-webkit-box-shadow: 0 3px 5px -3px #000;
-moz-box-shadow: 0 3px 5px -3px #000;
box-shadow: 0 3px 5px -3px #000;
Upvotes: 0