I am having an issue with z-index stacking. The below div is appearing over the top of the top div even when z-index and positions state the below div should be under the div above it.
I have provided a JSFiddle of an example with the code that I am using.
https://jsfiddle.net/6hewonhb/
.above-box {
padding-left: 50px;
padding-right: 50px;
padding-top: 20px;
padding-bottom: 20px;
background: rgba(251, 47, 111, 0.2);
color: #fff;
z-index: 10 !important;
position: relative !important;
margin-top: 0px !important;
margin-right: 0px !important;
margin-left: 0px !important;
height: 100px;
width: 100px;
}
.below-box {
margin-top: -20px !important;
margin-left: 70px !important;
position: relative !important;
z-index: 5 !important;
background-color: #f00;
height: 100px;
width: 100px;
}
<div class="above-box">
TEST
</div>
<div class="below-box">
TEST
</div>