Simple Way
You can achieve this with setting both the top
and bottom
attributes of the nav to 0
and the position: absolute
. Set the container to position: relative
.
Modern Way (Flexbox)
IE11+ and all modern browsers support flexbox.
.container {
display: flex;
flex-direction: column;
}
.child {
flex-grow: 1;
}