Save min.html as max.html.  Leave the styles as before apart from adding this line:

max-height:400px;

The div should now grow between the minimum and maximum values.  To prove this add or remove paragraphs as needed.

Finally add overflow-y (just like you did it in overflow.html) so that when the content grows beyond the limit the user can see the it by scrolling.