The snippets below can be used as a boilerplate for creating a basic sticky footer.

HTML

<!DOCTYPE HTML>  
<html>  
<head>  
    <link rel="stylesheet" type="text/css" href="css/style.css" />
</head>  
<body>  
    <div class="wrapper">
        <p>main content</p>
    </div>

    <div class="footer">
        <p>footer content</p>
    </div>
</body>  
</html>  

CSS

* {
    margin: 0;
}

html, body {  
    height: 100%;
}

.wrapper {
    min-height: 100%;
    margin-bottom: -60px;
}

.wrapper:after {
    content: "";
    display: block;
}

.footer, .wrapper:after {
    height: 60px;
}

Example