html - How do I make a child div match the height of scrolling parent? -


how can make div , nested divs extend down full height of screen scrolling on body?

link fiddle: https://jsfiddle.net/qsczjd01/

css:

#megaall{   box-sizing: border-box;   position: absolute;   background-color: gray;   top: 0px;   bottom: 0px;   left: 0px;   right: 0px; } 

i need #megaall (gray), #megamain(pink), , #contentcontainer extend way down page, seems unable extend full height because of scrolling on body. need scrolling on body , fixed sidebar on right remain.

extending them down height:auto; need not mentioned default. whatever height of body, auto adjust on page. "sidebar on right remain" means fixed, work if got right.

position: fixed;


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -