Sometimes, we want to make a div 100% height of the browser window with CSS
In this article, we’ll look at how to make a div 100% height of the browser window with CSS.
How to make a div 100% height of the browser window with CSS?
To make a div 100% height of the browser window with CSS, we set the height to 100vh.
For instance, we write
div {
height: 100vh;
}
to make the div fill the screen with height: 100vh;
.
Conclusion
To make a div 100% height of the browser window with CSS, we set the height to 100vh.