I have a box shadow on a div that i want to stick out like a bar over the next div on the page, but when the next div has a background or background image, it won't show up. is there a way of the shadow showing over the next element even though they are both "position:initial;" http://jsfiddle.net/2u4Lvyn0/2/ so the shadow should overlook the blue box below it
HMTL
<div class="background-image-div"></div>
<div class="box-shadow-div"></div>
<div class="background-image-div"></div>
CSS
.box-shadow-div{
height:100px;
background:orange;
-webkit-box-shadow: 0px 3px 3px 15px rgba(0,0,0,1);
-moz-box-shadow: 0px 3px 3px 15px rgba(0,0,0,1);
box-shadow: 0px 3px 3px 15px rgba(0,0,0,1);
}
.background-image-div{
height:100px;
background:blue;
border:1px solid yellow;
}
I've seen a lot of posts on 'inset box-shadow' not working with it's own divs background image but couldn't find anything about just regular sibling divs.
Adding position:relative;
will fix it. Though, it may affect other CSS tweaks you already have.
http://jsfiddle.net/2u4Lvyn0/5/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With