Calculate dynamic height via css
<p>I have something as below. Theoretically, an image above and a div below. The image and the div fits into a full page, in which the div takes the remaining of the image height, in which when the content overflows the height, it can be scrollable.</p>

<p><strong>Keyword: Image with dynamic height, pure css solution</strong><br>
And my question is: Is this possible to be done purely by css alone?</p>

<p>I am expecting something like this</p>

<pre><code>&lt;div id="outer"&gt;
    &lt;img id="image" src="" style="width: 100%;"&gt;
    &lt;div id="inner" style="height:calc(100% - imageHeight);"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p><a href="https://i.stack.imgur.com/qyrZK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qyrZK.png" alt="enter image description here"></a></p>