I have a parent div of max-height 80 rem. I have 2 child divs which don’t have fixed heights (depend on content inside). I want them to share 50-50 space if both their heights would’ve exceeded 40 rem. Otherwise have their max heights set to 70 rem each. How can I achieve this
Tried using setting their max heights to 70 each anyway, causes them to overflow the outer div as expected. Set max-heights to 50 each is inefficient in terms of space utilisation
2
Answers
CSS Code
Explanation
1. parent:
2. child: