The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › [Solved] How to add Shadows on all 4 Sides of a block with CSS?
Hello. I am currently developing a new theme for my Blog and I’ve stumbled across another problem (Problem #2 this is. #1 was solved by a user from this forum, thanks to him :) )
I know that i can add shadows on a block with CSS but that is like a drop-shadow. Something like this: http://css.flepstudio.org/images/box-shadow-1.jpg
But what if I want to add shadows on all 4 sides of that box? like if the light’s coming from before that block.
EDIT: Problem Solved, sorry for disturbing :) I forgot to remove offset
box-shadow: 0 0 20px #000 That will create a shadow on all sides of an element.
box-shadow: 0 0 20px #000
.allSides { width:350px;height:200px; border: solid 1px #555; background-color: #eed; box-shadow: 0 0 10px rgba(0,0,0,0.6); -moz-box-shadow: 0 0 10px rgba(0,0,0,0.6); -webkit-box-shadow: 0 0 10px rgba(0,0,0,0.6); -o-box-shadow: 0 0 10px rgba(0,0,0,0.6); }
Full Source……CSS Shadow Examples