title: Div Inside a Div Height Issue
body: <p>I have a div with 15% Height and another div inside it with 15% height as well. Inner div has a <code>&lt;p&gt;</code> tag and this <code>&lt;p&gt;</code> tag is dropped out from the inner div but when I remove the height of the inner div everything works fine. Here is my <code>html</code> code and <code>CSS</code> 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>.header {
    background-image: url("images/headerBg.jpg");
    height: 15%;
    width: 100%;
  }
  
  .title {
    background-color: red;
    float: left;
    height: 15%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="header"&gt;
    &lt;div class="title"&gt;
      &lt;h2&gt;Title&lt;/h2&gt;
  
    &lt;/div&gt;
  
  
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>See below image for reference. Red thing is inner div and "Title" should be inside that Red thing but it's not html</p>
  
  <p><a href="https://i.stack.imgur.com/6dbuc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6dbuc.png" alt="enter image description here"></a></p>