JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="column">
<div>50%</div>
</div>
<div class="column">
<div>50%</div>
</div>
<div class="column">
<div>50%</div>
</div>
<div class="column">
<div>50%</div>
</div>
</div>
CSS
html, body {
height: 100%;
margin: 0;
}
.container {
height: 100%;
}
.column {
position: relative; /* added property */
height: 25%;
}
.column > div { /* added rule */
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
@media screen and (min-width: 600px) {
.container {
display: flex;
flex-wrap: wrap;
}
.column {
flex-basis: 50%;
height: 50%;
}
}
/* general styles */
body {
font-family: 'Lato', sans-serif;
font-size: 1.3em;
color: #ccc;
background: #000;
/*margin-bottom: 70px;*/
}
.column {
padding: 15px;
/*border: 1px solid #666;*/
box-sizing: border-box;
}
.column:nth-child(1) {
background: #5c9;
}
.column:nth-child(2) {
background: #fb0;
}
.column:nth-child(3) {
background: #39f;
}
.column:nth-child(4) {
background: #f33;
}
main {
max-width: 1200px;
margin: 0 auto;
}
h1,
h2 {
text-align: center;
}