I've been at this for multiple hours, and nothing has worked. I'm trying to create a vertical side navigation bar on the left of the page with a width of 200 px and have it go all the way down the screen, depending on the content of the page it's on. In the remaining space to the right, I need to have a div for the "main content" of the page that completely fills the area and doesn't extend off the screen at all.
I've been mostly trying to style with flexboxes, because that seems to have gotten me the closest to my goal. However, usually whenever I apply some type of specific positioning or make some small change like change the height of one of the divs to 100%, they'll either completely disappear or reposition themselves in some strange place at the bottom of the page. Honestly, I've restarted so many times that my code is pretty simple. I'll just leave some tags that I think are useful.
body {
margin: 0
}
.container {
display: flex;
}
.sidenav {
width: 200px;
height: 100%;
float: left;
position: absolute;
background-color: blue;
}
.content {
float: left;
position: absolute;
background-color: red;
}
<div class="container">
<div class="sidenav"></div>
<div class="content"></div>
</div>
If required, I'm fine with js, jquery, or php. If you happen to know anything, thanks in advance!