JSFiddle - React, Tailwind, and code Playground

by tea4two

HTML

<div class="parent">
  <div>1</div>
  <div>2</div>
  <div>3</div>
  <div>4</div>
  <div>5</div>
  <div>6</div>
</div>

CSS

.parent {
  display: flex;
  width: 800px;
  margin: 0 auto;
  border: 2px solid grey;
  justify-content: space-between;
  flex-wrap: wrap;
}

.parent div {
  width: 22.5%;
  height: 200px;
  background-color: yellow;
  margin-bottom: 20px;
}
.parent div:last-child {
  flex-grow: 1;
  margin-left: 3.33%;
}