JSFiddle - React, Tailwind, and code Playground
HTML
<div ID="FIXED" onclick="this.style.display = 'none'" >
<div ID="CONTENT" onclick="this.style.display = 'none'">
</div>
</div>
CSS
#FIXED
{
position:fixed;
width:100%;
height:100%;
background-color:black;
}
#CONTENT
{
position:relative;
width:400px;
height:400px;
color:white;
background-color:white;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}