JSFiddle - React, Tailwind, and code Playground
HTML
<div id="background">
<div id="box">
<div class="title">TITLE OF WEBSITE</div>
<div class="text">Text corresponding to the specfic background shown.</div>
<div class="button">
<button type="button">Randomizing button</button>
</div>
</div>
</div>
CSS
html, body {
height: 100%;
}
#background {
height: 100%;
}
#box {
background: #fff;
width: 40%;
min-width: 400px;
height: 200px;
margin-left: auto;
margin-right: auto;
top: 40%;
position: relative;
}
.title {
width: 100%;
height: 50px;
float: left;
background: #e1e1e1;
text-align: center;
font-size: 24px;
line-height:50px;
}
.text {
background: #c8c8c8;
width: 100%;
height: 100px;
float: left;
text-align: center;
font-size: 18px;
position: relative;
padding-top: 20px;
}
.button {
width: 100%;
height: 50px;
float: left;
text-align: center;
background: #afafaf;
}