JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<style>
</style>
</head>
<body>
<div class="wrapper">
<div class="box">A</div>
<div class="box">B</div>
<div class="box">C</div>
<div class="box">D</div>
<div class="box">E</div>
</div>
</body>
</html>
CSS
body {
margin: 30px;
}
/*autoprefixer will add the prefixed properties for grid and columns/rows
we need to create tracks for gaps for IE*/
.wrapper {
display: -ms-grid;
display: grid;
grid-gap: 10px;
grid-auto-rows: 150px;
-ms-grid-columns: 1fr 1fr 1fr 1fr;
-ms-grid-rows: 160px 160px 160px 160px;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
background-color: #fff;
color: #444;
}
.box {
background-color: #444;
color: yellow;
border-radius: 5px;
font-size: 150%;
text-align:center;
}