JSFiddle - React, Tailwind, and code Playground

HTML

<span class="cover"><div class="box"></div></span>
<span class="cover2"><div class="box"></div></span>

CSS

.box 
{
    display:block; 
    box-shadow: 0px 0px 20px 10px #ccc;
    height:100%;
    width:100%;
}

.cover
{    
    display:block;       
    cursor: move;
    position: absolute;
    top: 100px;
    left: 100px;
    width: 200px;
    height: 200px;
    padding:15px; /* This is the trick */
}

.cover2
{
    display:block;       
    cursor: move;
    position: absolute;
    top: 200px;
    left: 200px;
    width: 200px;
    height: 200px;
    padding:15px; /* This is the trick */
}

.cover .box
{
    background-color: green;
}

.cover2 .box
{
    background-color: blue;
}