I'm new with CSS and have looked up many ways, but can't get the footer to align to the bottom. Any help? Thank you.
.footer {
position: bottom;
bottom: -10px;
height: 30px;
width: 100%;
background-color: #171717;
color: white;
}
Change position to fixed.
.footer {
position:fixed;
bottom:0px;
height:30px;
width:100%;
background-color:#171717;
color:white;
}
I would also add the left property in case there are other divs and such that can push the footer
.footer {
position:absolute;
bottom:0px;
left: 0px;
height:30px;
width:100%;
background-color:#171717;
color:white;
}
Try something like;
#footer {
position: absolute;
bottom: 0;
width: 100%;
height: 30px;
background-color: #171717;
color: white;
}
Here is a working Live Demo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With