JSFiddle - React, Tailwind, and code Playground

HTML

<div class="flex">
<div class="item">
This is the first line.<br>
This is the second line.<br>
This is the third line.<br>
This is the fourth line.<br>
</div>
</div>

CSS

.flex {
  display: flex;
  flex-flow: row wrap;
  align-content: center;
  justify-content: center;
  overflow: scroll;
  height: 100px;
  width: 100px;
  border: 5px solid black;
}

.item {
  height: 150px;
  width: 150px;
  border: 5px solid lime;
  flex: none;
}