JSFiddle - React, Tailwind, and code Playground
by Dineshkani
HTML
<div id="first"></div>
<div id="second"></div><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
Without the z-index the second div overlaps the first div. If we give z-index for the first div then it will shows first. Change the z-index to see difference.
CSS
#first{
width: 500px;
height: 200px;
background-color: red;
position: absolute;
z-index: 2;
}
#second{
width: 500px;
height: 200px;
background-color: blue;
position: absolute;
z-index: 1;
}