z-index => allows you to LAYER your components
z-index: 2147483638 is the maximun "height" you can give your component
otherwise it will not work
z-index: -1;
/* The z-index property specifies the stack order of an element. */
.z-index {
z-index: -1;
}
You can do this, but only if the parent doesn't have a
position: relative or absolute property on it.
So if you remove the position: absolute from the
first div, it'll work as expected.
<div class="wrapper">
<div class="dashed-box">Dashed box</div>
<div class="gold-box">Gold box</div>
<div class="green-box">Green box</div>
</div>
#blue {
background-color: blue;
z-index: 3;
}
#red {
background-color: red;
z-index: 2;
}
#green {
background-color: green;
z-index: 1;
}