I have this code where i have two fixed navbars at the top and bottom.
I want the box to be of the size between the two navbars and to change it with the size of the nav changing with the size of the screen to always see the margin and the text of the cards.
body, html{
width:100%;
height:100%;
margin:0;
}
.nav{
padding:5px;
margin:0;
position:fixed;
width:100%;
background-color:#84a9ca;
font-size:5vh;
}
.bas{
opacity:0.5;
bottom:0;
}
.box{
width:100%;
height:100%;
background-color:#6ec6e1;
display:flex;
justify-content:space-around;
}
.element{
background-color:#488a45;
width:100px;
margin:5px;
}
<!--change with the size of the window-->
<div class="nav haut">nav</div>
<!--take all the place but want it to be just between the navs-->
<div class="box">
<!--text and margin hidden by the nav-->
<div class="element">element</div>
<div class="element">element</div>
<div class="element">element</div>
</div>
<!--transparent to show what's behind-->
<div class="nav bas">nav</div>