Specify max-height css property to Screen size .scroll_div { max-height: 100vh; overflow: auto; } Reference javascript - How to specify max-height css property to Screen size - Stack Overflow