Modern Clean CSS “Sticky Footer”
They call him the James Dean of sticky footers, the Sexy Kind, the Genghis Khan footer.
Clean, modern, simple, no hacks needed. Works for IE8+, Chrome, Firefox, Opera.
Does not(!) require any "wrapper" elements because it's being pushed down by the flexible body height.
Far too sexy if you don't need support for vanity browsers. Optionally exchange the HTML5 markup for good old divs (IE8).
html {
position: relative;
min-height: 100%;
}
body {
margin: 0 0 100px; /* bottom = footer height */
}
footer {
position: absolute;
left: 0;
bottom: 0;
height: 100px;
width: 100%;
}
Yup, that's it, no questions asked. Here's the sample HTML5.
<!DOCTYPE html>
<head>
<title></title>
</head>
<body>
<nav></nav>
<article>Lorem ipsum...</article>
<footer></footer>
</body>
</html>
Licence: A comment or a tweet goes a long way.
-
Jamie C
-
Niels
-
Lucy
-
mystrdat
-
Lucy
-
Lucy
-
mystrdat
-
-
-
-
Andrew Wilson
-
mystrdat
-
Andrew Wilson
-
mystrdat
-
Andrew Wilson
-
-
-
-
-
Geri
-
http://twitter.com/Thevolone The-Devo
-
mystrdat
-
-
Eric
-
http://www.facebook.com/john.ag.925 John Ag
-
Virgil Fabre
-
Craig Moore
-
Flobin
-
Kristen Shirkey
-
mystrdat
-
-
pinklife
-
Hunor
-
Pau
-
mystrdat
-
Pau
-
mystrdat
-
Pau
-
-
-
-
-
Akanksha
-
Pau
-
Ali Shaded
-
mystrdat
-
-
Javienen Bernal
-
Henry
-
mystrdat
-
-
http://twitter.com/joemcasta Jose Castaneda
-
Shina
-
Daniel Lucas
-
Gérard Mathiuet
-
http://posmuara.blogspot.com/ muara fatan
-
Jake Murphy
-
mystrdat
-
-
http://twitter.com/cranstongivesin Michael Cranston
-
mystrdat
-
-
Andrius
-
http://twitter.com/joey89924 joey
-
Me
-
mystrdat
-
-
http://twitter.com/redkitedesign Debbie Campbell
-
davidgallagher
-
mystrdat
-
davidgallagher
-
mystrdat
-
davidgallagher
-
mystrdat
-
-
-
-
-
Kevin Sheppard
-
http://www.facebook.com/beetham Jason Beetham
-
http://twitter.com/nikokolev Nikolay Nedkov Kolev
-
Bob
-
mystrdat
-
-
james dean
-
Dr Jekyllandme
-
mystrdat
-
-
Charlie S
-
mystrdat
-