Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

let box-shadow overflow over parent elements?

Tags:

html

css

I am trying to apply a box shadow to an img element and I have its container with padding:0px so it is pretty tightly constrained. Consequently, its box-shadow is unable to overflow out and is just kind of crudely cut off.

example of crude cut-off

Is there any remedy for this?

like image 258
nkcmr Avatar asked Feb 15 '12 04:02

nkcmr


2 Answers

div.container { /* ... styles ... */ overflow:visible; }

http://jsfiddle.net/SExPg/

like image 78
Alex Avatar answered Sep 25 '22 15:09

Alex


My suggestion would be to just make the shadow smaller OR make the image smaller so you can have more shadow showing.

like image 22
jz416 Avatar answered Sep 25 '22 15:09

jz416