<div class="flex-container space-between" style="width: 100%; justify-content: space-around; flex-wrap: wrap;">
  <div class="alert">
    <p>Works only when there is more than one line of elements and the container has flex-wrap: wrap | wrap-reverse</p>
  </div>
  <div class="side flex-col flex-container">
    <h1>Align items 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>stretch</h2>
    <div class="flex-wrap flex-container flex-stretch">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
  </div>
  
  <div class="side flex-col flex-container">
    <h1>Align items with direction = <u><i>column</i></u></h1>
    
    <h2>flex-start</h2>
    <div class="flex-col flex-wrap flex-container flex-start">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
    
    <h2>flex-end</h2>
    <div class="flex-col flex-wrap flex-container flex-end">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
    
    <h2>center</h2>
    <div class="flex-col flex-wrap flex-container flex-center">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
    
    <h2>space-between</h2>
    <div class="flex-col flex-wrap flex-container flex-space-between">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
    
    <h2>space-around</h2>
    <div class="flex-col flex-wrap flex-container flex-space-around">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
    
    <h2>stretch</h2>
    <div class="flex-col flex-wrap flex-container flex-stretch">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
  </div>
</div>
.flex-container {
  display: flex;
  margin-bottom: 15px;
}

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

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

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

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

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

.flex-stretch {
  align-content: stretch;
}

/* 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;
  flex-wrap: wrap;
  min-height: 120px;
}

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

h1, h2 {
  margin-top: 0;
}

@media (max-width: 787px) {  
  .side {
    width: 250px;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.