My HTML layout looks like this:
body //display: flex
nav //flex-basis: 85px
main //flex-grow: 1
footer //flex-basis: 50px
On desktop view, the footer is at the bottom: but if the content grows, later on, the footer is no more at the bottom, there is a gap between the bottom of the page and the end of the footer.
on mobile, you can immediately see the gap.
I'm using display: flex
and looking for a way to make sure that the footer always stays at the bottom.
her'es the layout css:
body {
display: flex;
flex-direction: column;
min-height: 100vh;
}
nav {
flex-basis: 85px;
}
.main {
flex-grow: 1;
}
footer {
flex-basis: 50px;
background-color: #10182f;
color: white;
padding: 15px 0;
}
Thanks in advance