use flex in body to fix footer to the bottom code example
Example: position footer to stay at bottom of screen flexbox
/* Use flex and set auto margin */
body {
display: flex;
flex-direction: column;
min-height: 100vh;
}
footer {
margin-top: auto;
}