<div class="flex-container space-between" style="width: 100%; justify-content: space-around; flex-wrap: wrap;">
  <div class="alert">
    <p>Works only when the container has flex-direction: row | row-reverse</p>
  </div>
  <div class="side flex-col flex-container">
    <h1>Justify content with direction = <u><i>row</i></u></h1>
    
    <h2>flex-start</h2>
    <div class="flex-wrap flex-container flex-start">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
    
    <h2>flex-end</h2>
    <div class="flex-wrap flex-container flex-end">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
    
    <h2>center</h2>
    <div class="flex-wrap flex-container flex-center">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
    
    <h2>space-between</h2>
    <div class="flex-wrap flex-container flex-space-between">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
    
    <h2>space-around</h2>
    <div class="flex-wrap flex-container flex-space-around">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
    
    <h2>space-evenly</h2>
    <div class="flex-wrap flex-container flex-space-evenly">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
  </div>
</div>
.flex-container {
  display: flex;
  margin-bottom: 15px;
}

.flex-start {
  justify-content: flex-start;
}

.flex-end {
  justify-content: flex-end;
}

.flex-center {
  justify-content: center;
}

.flex-space-between {
  justify-content: space-between;
}

.flex-space-around {
  justify-content: space-around;
}

.flex-space-evenly {
  justify-content: space-evenly;
}

/* General styles */

.alert {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  justify-content: center;
}

.alert p {
  padding: 10px;
  border-radius: 8px;
  background-color: darksalmon;
}

.flex-row {
  flex-direction: row;
}

.flex-col {
  flex-direction: column;
}

.side + .side {
  margin-left: 15px;
}

.side .flex-container {
  background-color: lightblue;
}

.side .flex-container div {
  background-color: lightgreen;
  padding: 10px;
  text-align:center;
  border: 2px solid lightblue;
}

h1, h2 {
  margin-top: 0;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.