flex positioning the footer 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;
}
/* Use flex and set auto margin */
body {
display: flex;
flex-direction: column;
min-height: 100vh;
}
footer {
margin-top: auto;
}