title: Force the max-height on an element which parent has no defined height without flexbox?
body: <p>Is there a way to force the <code>max-height</code> on an element which parent has <em>no defined</em> <code>height</code> without using the flexbox? </p>
  
  <p>I am on a mobile view, and would like to put some overflow on <strong><code>modal-content</code></strong> element (! attention, <em>not on the parent</em> <code>modal-dialog</code>) in scrolling, when it exceeds the screen height (JsFiddle <a href="https://jsfiddle.net/serhiol/rLtnz2n6/3/" rel="nofollow noreferrer">here</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-css lang-css prettyprint-override"><code>.modal {
    position: fixed; 
    top: 0; right: 0; 
    left: 0; bottom: 0;
    max-height: 100vh;  
    background: lightblue;
  }
  .modal-header {font-size: 40px;}
  .modal-dialog { margin: 10px; max-height: calc(100vh - 20px); background: yellow; }
  .modal-content{ margin: 10px; 
  font-size: 30px; overflow: auto; border: 1px red solid; background: rgba(255, 255, 204, 0.75);}</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="modal"&gt;
    &lt;div class="modal-dialog"&gt;
      &lt;div class="modal-header"&gt;
      Lorem ipsum dolor sit amet
      &lt;/div&gt;
      &lt;div class="modal-content"&gt;
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>