I am trying to achieve scroll as in this page https://docs.docker.com/engine/. Notice that the central container scrolls along with the page scrollbar, keeping the links containers on left and right fixed. After the scroll reaches the bottom of the container the rest of the page is scrolled to show the footer. So far I have tried put overflow:auto on the central container and the outer container. I have hidden the scrollbar for central container and only the scrollbar for outer container(which is the page) is shown. So I am able to scroll the page and also central container separately. I want to scroll the central container when the page is scrolled and when the scroll reaches the bottom of the central container, I want to scroll the rest of the page(which has footer etc.)
<div class="main_page">
<div class="header"></div>
<div class="main">
<div class="left_navigation"></div>
<div class="main_content"></div>
<div class="right_navigation"></div>
</div>
<div class="footer"></div>
</div>
So I have to keep the header, left_navigation and right_navigation fixed and scroll only the main_content. After the scroll reaches bottom of main_content, the rest of the page should scroll, so that header, left_navigation, right_navigation and main_content move up and the footer is shown. I am using plain javascript without any jquery.