A little dab'll do ya
Code Snippets
Fixed Footer
#footer {
position:fixed;
left:0px;
bottom:0px;
height:30px;
width:100%;
background:#999;
}
/* IE 6 */
* html #footer {
position:absolute;
top:expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px');
}
You can finde a preview here: http://www.flashjunior.ch/school/footers/fixed.cfm
You seem to have forgotten an id identifier (#).
footer {...
}
Should be:
#footer {...
}
- Kevin
Fixed.
For IE6 an alternative expression code used in http://www.ea.com.
To prevent the infinite scroll when #footer have border use negative margin-top of the same width (of the border).
*html #footer {
margin-top: -2px; /* prevents infinite scroll if #footer have a border of 2px*/
position: absolute;
top: expression(documentElement.scrollTop+(documentElement.clientHeight-this.clientHeight));
}
It doesn’t validate unfortunately.
Hi Chris,
With all due respect, I am getting this whole idea started recently and getting also involved with webdesign. any possibility for you to explain do I have to do anything in the html site of it to make this happen or is it that just change the footer info in css page???
I would appreciate your help.
Thank you very much in advance.
( I am working with DW CS4)
Looking forward to hearing from you soon,
Falkon
Just put this in the body of the html:
Your text here :D
Put the CSS in the header in tags or place it in an external stylesheet.
Spring into HTML and CSS by Molly E. Holyschlag is a great book for beginners.
Hi guys I tried this code, now I have no footer period…what am I doing wrong? please help.
thanks in advance.
it worked with the other template but this one, I just lost the whole footer.
Hi, this works perfectly on Chrome/Firefox, but doesn’t in Safari – any idea why and how to get around fixing this?
thanks!
Try this – works for me in every situation I’ve used it.
http://www.cssstickyfooter.com/using-sticky-footer-code.html
Best part, no expressions!