title: How do I overlay container div on another container using Bootstrap or CSS
body: <p><a href="https://i.stack.imgur.com/q1qGi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q1qGi.png" alt="this is a layout that i want to achieve."></a></p>
  
  <hr>
  
  <p>I have designed a layout using Bootstrap 4 in which container b is next to container A. but I want container B to overlay some part of container A as shown in image.
  How can I achieve this type of layout? Any help or reference would be appreciated. </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;!-- container A --&gt;
          &lt;div class="container-fluid"&gt;
           &lt;div class="row text-center"&gt;
              &lt;div class="col-12"&gt;
                &lt;h4&gt;HOW IT WORKS&lt;/h4&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          
            &lt;div class="row text-center"&gt;
              &lt;div class="offset-md-2 col-md-2 px-0"&gt;
                  &lt;div class="card"&gt;
                      &lt;div class="card-header"&gt;
                        card 1 title
                      &lt;/div&gt;
                      &lt;div class="card-body"&gt;
                         card 1 body
                
                      &lt;/div&gt;
                    &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="offset-md-1 col-md-2"&gt;
                &lt;div class="card"&gt;
                      &lt;div class="card-header"&gt;
                        card 2 header
                      &lt;/div&gt;
                      &lt;div class="card-body"&gt;
                          card 2 body
                      &lt;/div&gt;
                    &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="offset-md-1 col-md-2"&gt;
                  &lt;div class="card"&gt;
                      &lt;div class="card-header"&gt;
                        card 3 header
                      &lt;/div&gt;
                      &lt;div class="card-body"&gt;
                        card 4 body
                      &lt;/div&gt;
                    &lt;/div&gt;
              &lt;/div&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;!-- container B --&gt;
  
          &lt;div class="container rounded-border"&gt;
            &lt;div class="row"&gt;
              &lt;div class="col-12 text-center"&gt;
                &lt;h4 class="display-4"&gt;What is Lorem Ipsum&lt;/h4&gt;
                &lt;p&gt;
                ustry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker includin
                &lt;/p&gt;
              &lt;/div&gt;
             
            &lt;/div&gt;
          &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>