Sometimes, we want to make a floated div 100% height of its parent with CSS.
In this article, we’ll look at how to make a floated div 100% height of its parent with CSS.
How to make a floated div 100% height of its parent with CSS?
To make a floated div 100% height of its parent with CSS, we use flexbox.
For instance, we write
div {
display: flex;
}
to make the divs a flex container.
Then anything inside would have 100% of the height of the container.
Conclusion
To make a floated div 100% height of its parent with CSS, we use flexbox.