Forum Moderators: not2easy

Message Too Old, No Replies

CSS footer DIV (always aligns to bottom)

         

ta_da

12:24 pm on Feb 26, 2007 (gmt 0)

10+ Year Member



Hi,

I have finally made the switch across to complete CSS design/layout and am really loving it I must say, however a few things still elude me.

For example, how do I create a generic footer class which I can add to the bottom of all my pages which will either stay at the bottom of the browser or sit below my content? I have tried several variations of the the following with no luck.

div.footer1 {
float:left;
width:100%;
bottom:0px;
margin-bottom:0px;
z-index: 9999;
}

or

div.footer2 {
position:absolute;
width:100%;
bottom:0px;
margin-bottom:0px;
z-index: 9999;
}

This is a real general problem for me as I am still unsure in CSS how to make content areas which will auto position beneath dynamic content which expands/contracts down the page.

Any general tips or solutions would be really appreciated.

Fotiman

4:08 pm on Feb 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There is an example of this in the CSS spec in section
9.6.1 Fixed Positioning [w3.org]. Perhaps that example will help you out.