E
E
EvgMul2016-07-08 12:10:07
css
EvgMul, 2016-07-08 12:10:07

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

2 answer(s)
K
Konstantin Samsin, 2016-07-08
@EvgMul

Link to example
A if in a nutshell:

height: 100vh;
overflow: auto;
overflow-x: hidden // чтобы убрать горизонтальный скролл

O
Oleg, 2016-07-08
@politon

https://jsfiddle.net/joomla/c06qnz0m/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question