Created
October 25, 2012 22:43
-
-
Save Ricardo-Diaz/3955937 to your computer and use it in GitHub Desktop.
CSS: Footer Fixed Position
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Giving your footer a fixed position – position:fixed | |
| This makes your footer stick to the bottom of the screen. Change the background color to your needs. | |
| #footer { | |
| position:fixed; | |
| left:0px; | |
| bottom:0px; | |
| height:32px; | |
| width:100%; | |
| background:#333; | |
| } | |
| /* 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'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment