while awaiting for clarification, here is a sample/template that could do what you look for via grid (it could be flex if you feel more confident with it).
html,
body,
body > div {
height: 100%;
margin: 0;
}
body > div {
display: grid;
grid-template-rows: 1fr auto;
}
nav {
background: blue;
padding: 1em;
order: 1;
}
main {
overflow: auto;
}
<div>
<nav>At the bottom , of any height.</nav>
<main> let me scroll if too <br><br><br><br><br><br><br><br>...<br><br><br><br><br><br><br>....<br><br><br><br><br><br><br><br>....<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>....<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>....<br><br><br><br><br><br><br><br><br><br>....short</main>
</div>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…