Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make my footer align to the very bottom?

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;
}
like image 238
Rogustus Avatar asked Aug 31 '12 04:08

Rogustus


3 Answers

Change position to fixed.

.footer {
    position:fixed;
    bottom:0px;
    height:30px;
    width:100%;
    background-color:#171717;
    color:white;
}
like image 104
CoreyRS Avatar answered Nov 14 '22 16:11

CoreyRS


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;
}
like image 1
Mutu Yolbulan Avatar answered Nov 14 '22 15:11

Mutu Yolbulan


Try something like;

#footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 30px;
    background-color: #171717;
    color: white;
}

Here is a working Live Demo.

like image 1
Alfred Avatar answered Nov 14 '22 14:11

Alfred