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

Popular posts from this blog

文具控必去! 隱藏在台北市區巷弄的四家文房具小店

[JAPAN/OKINAWA]沖繩,不私藏!雜貨文具控必去!

[結婚大小事♥]How to write wedding invitation 喜帖內文和信封到底怎麼寫?(collection)