how to set footer at bottom code example
Example 1: why is my footer not at the bottom html
#footer {
position:fixed;
left:0px;
bottom:0px;
height:30px;
width:100%;
background:#999;
}
//name footer id="footer"
Example 2: how to set the footer at the bottom using css
#page-container {
position: relative;
min-height: 100vh;
}
#content-wrap {
padding-bottom: 2.5rem;
}
#footer {
position: absolute;
bottom: 0;
width: 100%;
height: 2.5rem;
}
Example 3: sticky footer
html, body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
}
.content {
flex: 1 0 auto;
}
.footer {
flex-shrink: 0;
}