Any way to get box-shadow on left & right (horizontal?) sides only with no hacks or images. I am using:
box-shadow: 0 0 15px 5px rgba(31, 73, 125, 0.8);
But it gives shadow all around.
I have no borders around the elements.
Any way to get box-shadow on left & right (horizontal?) sides only with no hacks or images. I am using:
box-shadow: 0 0 15px 5px rgba(31, 73, 125, 0.8);
But it gives shadow all around.
I have no borders around the elements.
This works fine for all browsers:
DEMO
You must use the multiple
box-shadow;
. Inset property make it look nice and insideTry this, it's working for me:
In some situations you can hide the shadow by another container. Eg, if there is a DIV above and below the DIV with the shadow, you can use
position: relative; z-index: 1;
on the surrounding DIVs.You can use 1 div inside that to "erase" the shadow:
You can play with "height:%;" and "width:%;" to erase what shadow you want.
For horizontal only, you can trick the box-shadow using overflow on its parent div: