<div class="container">
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
</div>
.container {
  display: grid;
  height: 500px;
  grid-template-columns: 100px 100px 100px 100px;
  grid-template-rows: 100px 100px;
  justify-content: space-between;
  .item {
    background: orange;
    margin: 5px;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.