I want to extend the height of an element to the bottom of the height of its parent element. I couldn't find any way or solution to do it. Here is my code.
So, there is some content above the child element, and I want the child element to OCCUPY all the space that is below that. Basically: the rest of the parent element (to the bottom of its height).
I also tried making an awful visual display of the height of the child element should be extended - https://i.stack.imgur.com/wSFRW.png (the area colored in red should be its new height).
Currently, it only has its own height with padding
that I added in CSS and its element.
.parent {
background: #232323;
height: 500px;
}
h1 {
color: white
}
.child {
padding: 50px;
border: 3px solid red;
}
<div class="parent">
<h1>*Some other content*</h1>
<div class="child">
<h1>*The content of the child element*</h1>
</div>
</div>