Wednesday 28 December 2016

footer alway on bottom


 <script>

  $(document).ready(function() {

   var docHeight = $(window).height();
   var footerHeight = $('footer').height();
   var footerTop = $('footer').position().top + footerHeight;

   if (footerTop < docHeight) {
    $('footer').css('margin-top', 10+ (docHeight - footerTop) + 'px');
   }
  });
 </script>

No comments:

Post a Comment