title: Creating a flexbox grid with images that resizes properly
body: <p>I'm creating a grid in flexbox that has images on one side and then text on the other. The problem I'm facing is that the images aren't aligning properly in the grid. </p>
  
  <p>Here is my code: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>/* iPhone */
  
  @media only screen and (max-width: 768px) {
    body {
      overflow-x: hidden;
    }
    .body-img {
      background: url('background-mobile.png') no-repeat fixed;
      -webkit-background-size: cover;
      -moz-background-size: cover;
      background-size: cover;
      -o-background-size: cover;
      height: 100vh;
      width: 100%;
    }
    .search-img {
      background: url('search-img-mobile.png') no-repeat fixed;
      -webkit-background-size: cover;
      -moz-background-size: cover;
      background-size: cover;
      -o-background-size: cover;
      height: 100vh;
      padding-bottom: 10%;
    }
    .logo {
      width: 150px;
      margin-top: 15%;
    }
    h1,
    h2 {
      font-family: 'Open Sans', sans-serif;
      color: #ffffff;
      font-weight: 300;
      padding-top: 20%;
    }
    h1 {
      font-size: 1.5em;
    }
    h2 {
      font-size: 1.5em;
      padding-bottom: 15%;
    }
    h3 {
      font-family: 'Open Sans', sans-serif;
      font-size: 1.0em;
      font-weight: 400;
    }
    .searchbar {
      margin-top: 15%;
    }
    .btn {
      background-color: #1075C1;
      color: #ffffff;
      border-radius: 0px;
    }
    @keyframes bouncing {
      0% {
        bottom: 0;
      }
      50% {
        bottom: 20px;
      }
      100% {
        bottom: 0;
      }
    }
    .arrow {
      animation: bouncing 1s infinite ease-in-out;
      bottom: 0;
      display: block;
      height: 26px;
      left: 50%;
      margin-left: -25px;
      position: absolute;
      width: 26px;
    }
    .left {
      background-color: #1075C1;
    }
    .col-md-12 {
      min-height: 0px;
    }
    .container-flex {
      display: flex;
      flex-direction: column-reverse !important;
      justify-content: space-between;
    }
    .container-flex2 {
      display: flex;
      flex-direction: column-reverse !important;
      justify-content: space-between;
    }
    .searchbox {
      background-color: rgba(255, 255, 255, 0.6);
      padding-top: 5%;
      padding-left: 5%;
      padding-right: 5%;
      padding-bottom: 5%;
    }
    .form-check-label {
      font-size: 0.8em;
    }
    .btn-lg {
      padding-left: 25%;
      padding-right: 25%;
      padding-top: 5%;
      padding-bottom: 5%;
    }
    .btn-lg:hover {
      background-color: #003e6c;
    }
  }
  
  @media only screen and (min-width: 1024px) {
    body {
      overflow-x: hidden;
    }
    .body-img {
      background: url('nathan-dumlao-609935-unsplash.png') no-repeat fixed;
      -webkit-background-size: cover;
      -moz-background-size: cover;
      background-size: cover;
      -o-background-size: cover;
      height: 100vh;
      width: 100%;
    }
    .logo {
      width: 250px;
      margin-top: 15%;
    }
    h1,
    h2 {
      font-family: 'Open Sans', sans-serif;
      color: #ffffff;
      font-weight: 300;
      padding-top: 5%;
    }
    .searchbar {
      margin-top: 8%;
    }
    .btn {
      background-color: #1075C1;
      color: #ffffff;
      border-radius: 0px;
    }
    .arrow {
      display: none;
    }
    .container-flex {
      display: flex;
      flex-direction: row !important;
      justify-content: space-between;
      background-color: #1075C1;
    }
    .container-flex2 {
      display: flex;
      flex-direction: row-reverse;
      background-color: #1075C1;
      justify-content: space-between;
    }
    .left {
      background-color: #1075C1;
    }
    .description {
      background-color: #1075C1;
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;section id="one"&gt;
    &lt;div class="container-flex"&gt;
      &lt;div class="left"&gt;
        &lt;div class="row"&gt;
          &lt;div class="col-sm-12 col-md-12 col-lg-12 text-center"&gt;
            &lt;h2&gt;Sign up for our career guide and receive free insight into available jobs&lt;/h2&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="right"&gt;
        &lt;img src="section1-mobile.png" class="img-fluid"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="container-flex2"&gt;
      &lt;div class="left"&gt;
        &lt;div class="row"&gt;
          &lt;div class="col-sm-12 col-md-12 col-lg-12 text-center"&gt;
            &lt;h2&gt;Answer questions as we help you with your job search&lt;/h2&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="right"&gt;
        &lt;img src="section2.png" class="img-fluid"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="container-flex"&gt;
      &lt;div class="left"&gt;
        &lt;div class="row"&gt;
          &lt;div class="col-sm-12 col-md-12 col-lg-12 text-center"&gt;
            &lt;h2&gt;Get matched with companies looking for talent like you&lt;/h2&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="right"&gt;
        &lt;img src="section3.png" class="img-fluid"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/section&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The <a href="https://i.stack.imgur.com/firr8.jpg" rel="nofollow noreferrer">end result</a> I'm looking for. </p>
  
  <p>I'm not sure what I'm doing wrong in the CSS?</p>