DEV Community

Discussion on: 100vh behavior on Chrome

glittle profile image
Glen Little

Another approach that seems to work is to put height:100% on all parent elements up to and including the body and the html elements.

leonelngande profile image
Leonel Elimpe

Thanks! Thought it wasn't going to work but I went through each parent element (up to html) in devtools and added height: 100%, and it worked :-).

mateinenciu profile image
Matei Nenciu • Edited on

I think this is actually the best way to do it without extra hacks for all platforms / screen types.