Sticky Footer

HTML

<head>
<!-- JS --> 

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
 <!--stickyfooter--> 
   <script>
   $(window).bind("load", function () {
    var footer = $("#footer");
    var pos = footer.position();
    var height = $(window).height();
    height = height - pos.top;
    height = height - footer.height();
    if (height > 0) {
        footer.css({
            'margin-top': height + 'px' 
        });
    }

}); </script>

</head>

<body>
<div id="footer">...</div>
</body>



source:
http://foundation.zurb.com/forum/posts/629-sticky-footer

Comments