JSFiddle - React, Tailwind, and code Playground

by E Ash

HTML

<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <title>Title</title>
  </head>

  <body>

    <section class="section">

      <div class="one">1</div>
      <div class="two">2</div>
      <div class="three">3</div>
      <div class="four">4</div>
      <div class="five">5</div>
      <div class="six">6</div>
      <div class="seven">7</div>

    </section>

  </body>

</html>

CSS

.section {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: space-between;
  background-color: #e4e4e4;
  height: 400px;
  width: 100%;
}

div {
  border: 1px solid black;
  width: 30%;
  height: 30%;
  background-color: tomato;
  text-align: center;
}

.one,
.two,
.three,
.four {
  min-height: 40%;
}

.five,
.six,
.seven {
  min-height: 20%;
}