<div class="stacked">
  <div class="item">1</div>
  <div class="item">2</div>
  <div class="item">3</div>
  <div class="item">4</div>
  <div class="item">5</div>
</div>
.stacked {
  background: skyblue;
  padding: 1rem;
  
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  
}

.item {
  background: gold;
  width: 30%;
  margin-bottom: 20px;
  text-align: center;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.