I'm trying to add a box shadow to #main-content-area
on the top side and 50% to both the left and right sides (from top), but it is not working.
What is wrong with my code?
.wrapper {
position: relative;
}
#main-content-area {
position: relative;
background-color: white;
margin: -80px auto auto auto;
z-index: 4;
border: 1px solid red;
}
.halfshadow {
position: absolute;
z-index: -1;
top: 0;
height: 50%;
box-shadow: 1px 0px 10px rgba(0, 0, 0, 0.5);
}
<div class="wrapper">
<div class="line"></div>
<div class="row">
<div class="col-sm-2">
</div>
<div class="col-sm-8" id="main-content-area">
<div class="row">
<div class="col-sm-4">
<img src="me.jpg" class="img-responsive" />
</div>
<div class="col-sm-4">
<img src="me.jpg" class="img-responsive" />
</div>
<div class="col-sm-4">
<img src="me.jpg" class="img-responsive" />
</div>
</div>
</div>
<div class="halfshadow"></div>
<div class="col-sm-2">
</div>
</div>
</div>
use width "halfshadow" div or place content. Here is example with added "width"