title: Inherit height from inside div to outside div
body: <p>I have a div with the below content.</p>
  
  <pre><code>&lt;div class="outsideDiv"&gt;
    &lt;div&gt;
      &lt;p&gt;Some text&lt;/p&gt;
    &lt;/div&gt;
  
    &lt;div class="imgContainer"&gt;
      &lt;img /&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The imgContainer is right of the div which contains the p</p>
  
  <p>The outsideDiv doesn't have a pre-defined height. It adjusts to the height of the p element. So if the p element has 500px height then the height of outside div will be 500px. My website is responsive, therefore the height of p (and so the height of outsideDiv) it isn't fixed and it changes depending on screen. This section works perfect.</p>
  
  <p>I want the height of imgContainer to be equal with the height of the outsideDiv.
  I have tried with position absolute and relative and it works but I don't want to use this way. Also I tried inherit height but no luck.</p>