I'm running into a CSS issue in the latest version of both Chrome and Firefox that I can't seem to isolate, any help appreciated.
I have a container div that has a 50px top margin. Within the container there's a sidemenu div that's set to 100%. The window has a height of 650px, but when the content is larger than 650px the sidemenu and container divs both is not getting fit into this
Oddly enough it works when you run the snippet, but not when you save the html in the snippet and run it locally. I'm guessing there's some css in StackOverflow that's solving my problem, but I'm not sure what the problem is or how to solve it.
edit: I've discovered that the body height is the size of the window, which is limiting the container div. Still not sure how to ensure the body height grows to the full size of the content.
html, body {
margin: 0;
}
#container {
margin-top: 50px;
height: 100%;
background-color: lightgreen;
}
#sidenav {
width: 250px;
height: 100%;
display: grid;
background-color: green;
align-content: space-between;
}
#menu {
grid-column: 1 / 2;
grid-row: 1 / 2;
background-color: red;
}
#footer {
grid-column: 1 / 2;
grid-row: 2 / 3;
}
<html>
<body>
<div id="container">
<div id="sidenav">
<div id="menu">
sidenav<br/><br/><br/><br/><br/>
sidenav<br/><br/><br/><br/><br/>
sidenav<br/><br/><br/><br/><br/>
sidenav<br/><br/><br/><br/><br/>
sidenav<br/><br/><br/><br/><br/>
sidenav<br/><br/><br/><br/><br/>
sidenav<br/><br/><br/><br/><br/>
</div>
<div id="footer">
footer<br/>
footer<br/>
footer<br/>
footer<br/>
footer<br/>
footer<br/>
</div>
</div>
</div>
</body>
</html>