JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">
<div>r</div><div>r.</div><div>r.</div><div>The fourth divaragradivh.</div><div>The first paragraph.</div><div>The second divaragradivh.</div><div>The third divaragradivh.</div><div>r</div><div>r</div><div>r</div><div>The second divaragradivh.</div><div>The third divaragradivh.</div><div>The fourth divaragradivh.</div><div>The fourth divaragradivh.</div><div>r</div><div>r.</div><div>r.</div><div>The fourth divaragradivh.</div><div>The first paragraph.</div><div>The second divaragradivh.</div><div>The third divaragradivh.</div>
<div>r</div><div>r</div><div>r</div><div>The second divaragradivh.</div><div>The third divaragradivh.</div><div>The fourth divaragradivh.</div><div>The fourth divaragradivh.</div><div>r</div><div>r.</div><div>r.</div><div>The fourth divaragradivh.</div><div>The first paragraph.</div><div>The second divaragradivh.</div><div>The third divaragradivh.</div><div>r</div><div>r</div><div>r</div><div>The second divaragradivh.</div><div>The third divaragradivh.</div><div>The fourth divaragradivh.</div><div>The fourth divaragradivh.</div>
</div>

CSS

.container div{
  padding:20px;
  display:inline-block;
  width:25%;
  margin:0px;
  padding:0px;
  background-color:blue;
}
.container div:nth-child(7n-6),.container div:nth-child(7n-5),.container div:nth-child(7n-4) {
  background: red;
width:33.333%;
margin:0px;
}