Dotclear


Ignore:
Timestamp:
10/18/12 14:41:18 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

A new hope for the sticky footer \o/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/js/common.js

    r343 r888  
    319319-------------------------------------------------------- */ 
    320320function positionFooter() { 
    321      $("#wrapper").css({ overflow: "auto" }); 
    322      var page_height = $("#top").height() + $("#wrapper").height() - $("#footer").height(); 
    323      if( page_height < $(window).height() ){ 
    324           // calcul de la largeur 
    325           var page_width = $(document).width() - 30; 
    326           $("#footer").css({ 
    327                position: "absolute", 
    328                bottom: "10px", 
    329                width: page_width+"px", 
    330                padding: ".75em 0", 
    331                marginbottom: "0" 
    332           }); 
    333      } else { 
    334           $("#footer").css({ 
    335                position: "static", 
    336                padding: ".75em 0", 
    337                width: "auto" 
    338           }); 
    339      } 
    340  
     321     $('#footer').constantfooter(); 
    341322} 
    342323 
     
    385366     }); 
    386367 
    387  
    388368     // Sticky footer 
    389369     positionFooter(); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map