I have a vertical nav-bar that takes that is a set 250px. I made the nav-bar a template on django and now I am looking to create a container div that fills the rest of the page. My question is how do I get this div to be the width of the entire page minus this nav-bar.
>Solution :
I would do it with grid. Set two columns, one 250px and give the second rest of space.
body{
margin:0;
}
.grid{
display: grid;
grid-template-columns: 250px 1fr;
height: 100vh;
width: 100vw;
}
.nav {
width:250px;
background-color: green;
}
.content {
width: 100%;
background-color: blue;
}
<div class="grid">
<div class="nav"></div>
<div class="content"></div>
</div>