title: Why is flex item overflowing container in mobile version?
body: <p>I am new to CSS and HTML, right now I am trying out FlexBox. Here is my code for the layout. Can anyone please explain to me why my second div (<code>.rightContainer</code>) leaves its parent? I already tried to delete the height, but it didn't work.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;FlexBox Test&lt;/title&gt;
      &lt;link rel="stylesheet" href="css/main.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div class="container"&gt;
          &lt;div class="leftContainer"&gt;
              &lt;div class="item"&gt;&lt;/div&gt;
              &lt;div class="item"&gt;&lt;/div&gt;
              &lt;div class="item"&gt;&lt;/div&gt;
              &lt;div class="item"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="rightContainer"&gt;
              &lt;div class="banner"&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><a href="https://jsfiddle.net/pvvqwrb4/3/embedded/result/" rel="nofollow">https://jsfiddle.net/pvvqwrb4/3/embedded/result/</a></p>