Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML footer problem

Tags:

html

footer

Is it possible to create a footer div that sits at the bottom of a site regardless of how much information is present in the middle?

Currently the div I have is positioned depending on how much content i have in the body.

See also:

How do you get the footer to stay at the bottom of a Web page?

like image 950
Razor Avatar asked Oct 11 '08 04:10

Razor


2 Answers

I am by no means a css expert, but this works for me across the major browsers:

.d_footer
{
    position:fixed;
    bottom:0px;
    background-color: #336699;
    width:100%;
    text-align:center;
    padding-top:5px;
    padding-bottom:5px;
    color:#ffffff;
}
like image 143
JasonS Avatar answered Nov 08 '22 20:11

JasonS


Float the content div and have the footer div use clear: both.

like image 42
Jonathan Mueller Avatar answered Nov 08 '22 22:11

Jonathan Mueller