Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

box-shadow both inset and outside on same div

Tags:

Can't I have both box shadow inner and outer on the same div? I've tried but it doesn't work

http://jsfiddle.net/CWuw8/

like image 773
pahnin Avatar asked Nov 01 '11 10:11

pahnin


1 Answers

You need to use comma to separate both shadows: http://jsfiddle.net/gryzzly/CWuw8/3/ You also need to add browser-specific prefixes in order for this to work everywhere it's supported:

div {   -webkit-box-shadow:      10px 10px 10px #000,      inset 0 0 10px #000;   -moz-box-shadow:      10px 10px 10px #000,      inset 0 0 10px #000;   -o-box-shadow:      10px 10px 10px #000,      inset 0 0 10px #000;   box-shadow:      10px 10px 10px #000,      inset 0 0 10px #000; } 

And you must also specify color for you shadow in order for it to be seen.

like image 133
Misha Reyzlin Avatar answered Oct 22 '22 06:10

Misha Reyzlin