PointlessCoder PointlessCoder - 3 years ago 95
CSS Question

How do I make CSS grid fill window height?

What is the best (simplest/most efficient) way to make a css grid fill the height of the window at any size without using

overflow: hidden
or something similar?


Answer Source

To achieve what you want to do, you could use viewport units. These are based on the viewport size (the size of your browser window).

1vh = 1% of the viewport height
1vw = 1% of the viewport width

So, to scale an element as wide/high as the viewport, you could just use: 100vh / 100vw. In your case that would be 100vh.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download