title: How to make my layout responsive using Bootstrap 4
body: <p>I have the following Grid system which looks like this:
  <a href="https://i.stack.imgur.com/6TdtD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6TdtD.png" alt="firstState"></a></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-html lang-html prettyprint-override"><code>&lt;div class="container" style="margin-top: 25px"&gt;
    &lt;div class="row"&gt;
  
      &lt;div class="col-8"&gt;
        &lt;div class="row"&gt;
          &lt;div class="col-12" style="border: 1px solid black"&gt;A1&lt;/div&gt;
          &lt;div class="col-12" style="border: 1px solid black"&gt;A2&lt;/div&gt;
          &lt;div class="col-12" style="border: 1px solid black"&gt;A3&lt;/div&gt;
          &lt;div class="col-12" style="border: 1px solid black"&gt;A4&lt;/div&gt;
          &lt;div class="col-12" style="border: 1px solid black"&gt;A5&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="col-4"&gt;
        &lt;div class="row" style="height: 100%"&gt;
          &lt;div class="col-12" style="border: 1px solid black; height: 100%"&gt;B&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://codepen.io/slava4ka/pen/QWWwOax" rel="nofollow noreferrer">https://codepen.io/slava4ka/pen/QWWwOax</a></p>
  
  <p>How can we make it so that when reducing the size of the visibility zone to <code>.col-sm-</code>, the grid looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/5CsTy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5CsTy.png" alt="secondState"></a></p>