Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css - shadow on right and left

Tags:

css

hi there i am using the following code to get a shadow on the right and left side of a div tag but all four sides of the div are shadowed...

.shadow1 {

   border-right:1px solid #8d8d8d;
   border-left:1px solid #8d8d8d;
   -moz-box-shadow:0px 0px 5px 0px #000;
 -webkit-box-shadow: 0px 0px 5px 0px #000 ;
       box-shadow: 0px 0px 5px 0px #000;

}

is there a way to get the shadow appear only on the right and left side of the div... ?? any help would be appreciated... thanks in advance... :)

like image 390
SRC SRC Avatar asked May 12 '26 00:05

SRC SRC


1 Answers

This seems to work ok :)

box-shadow: 5px 0px 5px -4px #000,
            -5px 0px 5px -4px #000;

EDIT: Oh, I'm waaay late :p looks like we came to more or less the same conclusion tho.

like image 105
Chris Ellery Avatar answered May 14 '26 13:05

Chris Ellery



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!