How to make a div 100% height of the browser window with CSS?

Sometimes, we want to make a div 100% height of the browser window with CSS

We’ll look at how to make a div 100% height of the browser window with CSS, in this article.

How to make a div 100% height of the browser window with CSS?

First we set the height to 100vh , To make a div 100% height of the browser window with CSS .

For instance, we can write

div {
  height: 100vh;
}

Fill the screen with height: 100vh;, to make the div.

Conclusion

Then we set the height to 100vh, To make a div 100% height of the browser window with CSS .

Leave a Reply