+ 2
how i can find web page total height (vertical length)
3 Réponses
+ 13
Use 100vh(viewport height).
Similar to 100% but it shows the 100% of the height of the viewport (i.e, the screen) and not of the parent element.
Eg-
div{
height:100vh;
}
+ 7
Use guess and check, eventually you will get a matching height.
Or be lazy and just use 100%
+ 2
If you want to find viewport height in pixel
viewportHeight = window.innerHeight;
https://code.sololearn.com/W4Mbn5gSd2fc/?ref=app