Is there a way to stretch middle div, make it fill the remaining space between the other two (header, footer) with limited heights. All three are placed within parent element which cover 100% of a viewport space. The conditions are all three divs have to be relative to it's content but with limits (max-height
) (except the middle one), so no absolute positioning; they must have the same parent element. I did find though the similar solved problem, but there was used a table structure, which is not what I looking for, but have exactly the same behavior that I want to apply to my concept.
Here the codepen, but I didn't figure out how to solve it yet. And one more, I don't want to use JS.
UPDATE
Also without using flexbox
, calc()
, tables
;