How to make <div> take up full screen

Hey there,

I’m trying to get the different “#top-section” div section of my page take up full screen when in view, but can’t seem to make it work.

I tried the CSS “height: 100%” as well as “background-size: cover” but they don’t seem to be working.

Any ideas on how to do this? codepen below:


#top-section {
 min-height: 100vh;

vh, being % vertical height of the view port (Viewport Height)

remove your existing height property first.


Wohoo! That totally worked, thanks :slight_smile:


haha no probs :smiley: