nice Sticky footer with CSS3

we are going to build a CSS-3 sticky footer that always stays at the bottom of the web page, no matter how much you minimize your browser vertically, it will always stay at the bottom of the page.
We will also throw in some CSS-3 shadows and some other goodies as well.

So then, lets start by putting in the HTML that we require

Thats it, Short and sweet

Now lets go and throw in some css that does all the hard work for us

But first we need to make the footer stay at the bottom and not anywhere else. So lets just do that

#stickey_footer { /* This will make your footer stay where it is */
background: none repeat scroll 0 0 #1D1D1D;
border: 1px solid rgba(0, 0, 0, 0.3);
bottom: 0;
font-family: Arial, Helvetica, sans-serif;
height: 40px;
left: 50%;
margin: 0 auto 0 -490px;
padding: 0 10px;
position: fixed;
text-shadow: 1px 1px 1px #000000;
width: 960px;

The margin, and the position is the real trick to this tutorial;
The fixed position enables to footer to move as you resize it. Pretty neat huh?Next, lets make our menu curvey, add in some hover effects and shadows.

/* border curves */
#stickey_footer {
-moz-border-radius: 10px 10px 0px 0px;
-webkit-border-radius: 10px 10px 0px 0px;
border-radius: 10px 10px 0px 0px;

/* hover effect */
#stickey_footer:hover {
background: none repeat scroll 0 0 #2b2a2a;

/* shadow for the footer*/
#stickey_footer {
-moz-box-shadow:0px 0px 11px #191919;
-webkit-box-shadow:0px 0px 11px #191919;
box-shadow:0px 0px 11px #191919;

#footer_menu {
margin: 0;
padding: 0;

#footer_menu li {
list-style: none;
float: left;
padding: 12px 14px 14px 14px;
border-right:1px solid rgba(0, 0, 0, 0.4);
background: rgba(0, 0, 0, 0.1);

#footer_menu .imgmenu {
padding:5px 8px 3px 14px;
background:url("images/home.png") 13px 5px no-repeat;
border-right:1px solid rgba(0, 0, 0, 0.4);

#footer_menu li:hover {
background:#202020; /* Fallback color for old browsers */
background: rgba(0, 0, 0, 0.3);

#footer_menu .imgmenu:hover {
background:url("images/home_hover.png") 13px 5px no-repeat;

#footer_menu li a {
display: block;
color: #cccccc;
text-decoration: none;

#footer_menu li a:hover {
color: #ffffff;

#footer_menu li span {

#stickey_footer #social_icons {
float:right; /* social icons positions */
margin:5px 15px 0px;

#stickey_footer #social_icons li {
margin-right:12px; /* 12px is the space between each one of them */
_margin-right:0px; /*for IE6 */

There, all tucked in nice and neat. And its all set to go.

Tested and works on all major browsers that support css-3 . Sorry no IE 6-7-8.


Be Sociable, Share!

Leave a comment