I need to create a box-shadow on some block element, but only (for example) on its right side. The way I do it is to wrap the inner element with box-shado
What I do is create a vertical block for the shadow, and place it next to where my block element should be. The two blocks are then wrapped into another block:
<div id="wrapper">
<div id="shadow"></div>
<div id="content">CONTENT</div>
</div>
<style>
div#wrapper {
width:200px;
height:258px;
}
div#wrapper > div#shadow {
display:inline-block;
width:1px;
height:100%;
box-shadow: -3px 0px 5px 0px rgba(0,0,0,0.8)
}
div#wrapper > div#content {
display:inline-block;
height:100%;
vertical-align:top;
}
</style>
jsFiddle example here.