JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">
    <div class="blue"></div>
    <div class="purple"></div>
    <div class="red"></div>
    <div class="green"></div>
</div>

CSS

* { box-sizing: border-box; }

.container {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-end;
    height: 100px;
    width: 400px;
    border: 2px solid black;
}

.container > div {
    width: calc(25% - 10px);
    height: calc(50% - 10px);
    margin: 5px;
}

.blue   { background-color: blue; }
.red    { background-color: red; }
.purple { background-color: purple; }
.green  { background-color: green; }