<div class="flex-container-1">
  <div>
    <p>1</p>
  </div>
  <div>
    <p>2</p>
  </div>
  <div>
    <p>3</p>
  </div>
  <div>
    <p>4</p>
  </div>
  <div>
    <p>5</p>
  </div>
  <div>
    <p>6</p>
  </div>
    <div>
    <p>7</p>
  </div>
  <div>
    <p>8</p>
  </div>
    <div>
    <p>9</p>
  </div>
</div>
<div class="flex-container-2">
  <div>
    <p>1</p>
  </div>
  <div>
    <p>2</p>
  </div>
  <div>
    <p>3</p>
  </div>
  <div>
    <p>4</p>
  </div>
  <div>
    <p>5</p>
  </div>
  <div>
    <p>6</p>
  </div>
    <div>
    <p>7</p>
  </div>
  <div>
    <p>8</p>
  </div>
    <div>
    <p>9</p>
  </div>
</div>
<div class="flex-container-3">
  <div>
    <p>1</p>
  </div>
  <div>
    <p>2</p>
  </div>
  <div>
    <p>3</p>
  </div>
  <div>
    <p>4</p>
  </div>
  <div>
    <p>5</p>
  </div>
  <div>
    <p>6</p>
  </div>
    <div>
    <p>7</p>
  </div>
  <div>
    <p>8</p>
  </div>
    <div>
    <p>9</p>
  </div>
</div>
.flex-container-1, .flex-container-2, .flex-container-3 {
  display: flex;
  background-color: lighten(darkorange, 20%);
  border: 1px solid black;
  margin-left: auto;
  margin-right: auto;
  margin-bottom:10px;
  
  & div {
    border: 1px solid black;
    width: 50px;
    height: 50px;
    background-color: darkorange;
    margin: 10px;
  }
  
  p {
    text-align: center;
  }
}

.flex-container-1 {
    width: 650px;
}

.flex-container-2 {
    width: 400px;
}

.flex-container-3 {
    width: 200px;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.