Answer the question
In order to leave comments, you need to log in
How to stretch a div vertically exactly to the end of the screen?
Hello.
There is a following task.
There is a div on the page. It should have the following properties:
1. Its height should stretch exactly to the screen visibility.
2. If the content of this div exceeds its height, then a scroll should appear.
Can you please tell me how to implement this?
Thanks in advance to all who respond.
Answer the question
In order to leave comments, you need to log in
Link to example
A if in a nutshell:
height: 100vh;
overflow: auto;
overflow-x: hidden // чтобы убрать горизонтальный скролл
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question