Sometimes, we want to make an HTML element fill out 100% of the remaining screen height, using CSS only.
In this article, we’ll look at how to make an HTML element fill out 100% of the remaining screen height, using CSS only.
How to make an HTML element fill out 100% of the remaining screen height, using CSS only?
To make an HTML element fill out 100% of the remaining screen height, using CSS only, we set the height ofi the element to 100vh.
For instance, we write
div {
height: 100vh;
}
to make the height of the div 100vh so that it fills the height of the screen.
Conclusion
To make an HTML element fill out 100% of the remaining screen height, using CSS only, we set the height ofi the element to 100vh.