<div class="grid-container">
  <div class="grid-item">Lorem</div>
  <div class="grid-item">Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</div>
  <div class="grid-item">Lorem</div>  
  <div class="grid-item">Lorem</div>
  <div class="grid-item">Lorem</div>
  <div class="grid-item">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam</div>  
  <div class="grid-item">Lorem ipsum dolor sit amet</div>
  <div class="grid-item">Lorem</div>
  <div class="grid-item">Lorem</div>  
</div>
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: row;
  padding: 1rem;
  gap: 1rem;
}

.grid-item {
  padding: 1rem 3rem;
  font-size: 1.2rem;
  font-family: cursive;
  color: #e6c037;
  background-color: #784367;
  text-align: center;
}

Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.