I have a container <div>
which has a max-height
property. This <div>
contains another <div>
, and I want the child <div>
to grow to the maximum height of its container.
<div id='parent'>
<div id='child'>
</div>
</div>
This is easy enough when the parent <div>
has a fixed height, but I cannot find a solution for making the child <div>
assume the max-height of the container. There is no padding or margin or anything to worry about - I simply need the child <div>
to assume the max-height
of the parent.
How can I do this?