To achieve the desired behavior where one div stretches the parent container and another div only fills the available height, you can make use of CSS Flexbox. Here's how you can structure the layout: 1.set the parent div to use Flexbox. 2.Set the first div to stretch(grow to fill the available space). 3.set the second div to only take up as much height as it needs, without stretching