<div class="block">
  <div class="block__item"></div>
  <div class="block__item"></div>
  <div class="block__item"></div>
  <div class="block__item"></div>
  <div class="block__item"></div>
</div>
.block {
  border: 1px solid red;
  display: flex;
  flex-wrap: wrap;
  //padding: 5px 3px 5px 5px;
  max-width: 900px;
  justify-content: flex-start;

}

.block__item {
  background: grey;
  height: 20px;
  margin-bottom: 5px;
  width: calc(33.32% - 10.66px);
  /*flex: 0 0 32.149%;*/
  margin: 8px;  
}
.block__item:nth-child(-n+3){
  margin-top:0; /* first row only */
}
.block__item:nth-child(3n+1){
  margin-left:0; /* first in row */
}
.block__item:nth-child(3n+3){
  margin-right:0; /* Last in row */
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.