<div class="w300">
  <div class="w100"></div>
  <div class="w100 red"></div>
  <div class="w100"></div>
</div>

<div class="wrapper">
  <div class="item"></div>
  <div class="item red"></div>
  <div class="item"></div>
  <div class="item"></div>
  <div class="item red"></div>
</div>
.w300 {
  display: flex;
  width: 100%;
}

.w100 {
  width: 100px;
  height: 100px;
  background-color: #eee;
}

.wrapper {
  display: flex;
  flex-wrap: wrap;
  width: 300px;
}

.item {
  width: 100px;
  height: 100px;
  background-color: #eee;
  box-shadow: 0 0 0 5px;
}

.red {
  background-color: #f99;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.