JSFiddle - React, Tailwind, and code Playground
by ZEZEME
HTML
<div class="ME">
<div class="MeImg">
<div class=BlackBox></div>
<div class="MeBlurb">
<p>Lorem ipsum dolor sit amet</p>
</div>
CSS
.ME {
position: relative;
height: 100vh; /* # */
background-color: #181818; /* # */
}
.MeImg {
display: block;
margin: 0 auto;
background-color: lightblue;
width: 80%;
height: 50%; /* # */
z-index: 1;
}
.BlackBox {
position: absolute;
border: 2px solid white; /* # */
height: 100%;width: 80%;
top: -6%;
left: 13%;
z-index: 0;
}
.MeBlurb {
background-color: rgba(255,172,172, 0.7);
color: white;
font-family: 'Raleway', sans-serif;
font-size: 20px; /*! change with media query */
line-height: 1.75em;
text-align: center;
position: absolute;
top: 20%;
left: 8%;
width: 30%;
padding: 20px;
z-index: 2;
}