JSFiddle - React, Tailwind, and code Playground
HTML
<div id="selector"></div>
CSS
#selector{
width:100%;
height:100px;
background-color:#333;
position: relative;
/*transform: translate(50%);*/
/*right: 50%;
top: 10px;*//* use margin */
width: 95%;
/*z-index: 20;*/
margin: 0 auto;
}
#selector::after{
content: '';
width: 95%;
height: 10px;
position: absolute;
right: 50%;
bottom: -4px;
border-radius: 5px;
transform: translate(50%);
background: #3D74FE;
z-index: -1;
}