How can i set the footer for different pages on the following site:
http://www.optimimo.com/home/contact
I am little confused on how to fix the footer at the bottom of different pages.
How can i set the footer for different pages on the following site:
http://www.optimimo.com/home/contact
I am little confused on how to fix the footer at the bottom of different pages.
Add height:100%
to html, body
and #pagewidth
Now add position:absolute; bottom:0
to footer
#pagewidth {
width: 100%;
height: 100%;
overflow: auto;
}
#footer {
font-family: 'PT Sans',Arial,Helvetica,sans-serif;
width: 100%;
background-color: #2d2d2d;
overflow: hidden;
padding: 24px 0;
margin: 20px 0 0;
color: #fff;
position: absolute;
bottom: 0;
line-height: 16px;
}
try this
#footer {
background-color: #2D2D2D;
bottom: 0;
color: #FFFFFF;
font-family: 'PT Sans',Arial,Helvetica,sans-serif;
line-height: 16px;
margin: 20px 0 0;
overflow: hidden;
padding: 24px 0;
position: absolute;
width: 100%;
}
Here's what I did (@Sowmya, you forgot to take care of some edge-cases)
html { height: 100%; }
body {
min-height: 100%; /* Otherwise your page will have no background if the content is longer than one screen-height */
position: relative; /* To let the footer allways be on page-bottom, not at one-screen-height */
}
#pagewidth { padding-bottom: 5em /* aprox. the height of the footer ... */ }
footer#footer { position: absolute; bottom: 0; left: 0; right: 0; width: 100% /* Fixes some IE mis-alignments ... */ }
If you want the footer always to be at the bottom of the screen, set the footer to position fixed.