How to get screen height in css?

You can’t “get” the viewport height as such, in the way that you can with JS to store it in a variable, but you can use it in calc() to change the height of elements. For example, height: calc( 100vh – 50px ); which would equate to “the window height less 50px”