<div class="flex-container space-between" style="width: 100%; justify-content: space-around;">
  <div class="side flex-col flex-container">
    <h1>Order items with direction = <u><i>row</i></u></h1>
    
    <h2>row</h2>
    <div class="flex-row flex-container">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
    
    <h2>row-reverse</h2>
    <div class="flex-row-reverse flex-container">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
  </div>
  
  <div class="side flex-col flex-container">
    <h1>Order items with direction = <u><i>column</i></u></h1>
    
    <h2>column</h2>
    <div class="flex-col flex-container">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
    
    <h2>column-reverse</h2>
    <div class="flex-col-reverse flex-container">
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </div>
  </div>
</div>
.flex-container {
  display: flex;
  margin-bottom: 15px;
}

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

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

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

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

/* General styles */

.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.