Team:UCLondon/Templates/Team-Style

From 2012e.igem.org

(Difference between revisions)
Line 96: Line 96:
jQuery.fn.center = function () {
jQuery.fn.center = function () {
-
   var w = $('body');
+
   var w = $(window);
   this.css({
   this.css({
     'position':'absolute',
     'position':'absolute',
     'left':  '50%',
     'left':  '50%',
     'margin-left': 0 - (this.width() / 2),
     'margin-left': 0 - (this.width() / 2),
-
     'top': '50%',
+
     'top': w
-
    'margin-top' :  0 - (this.height() / 2)
+
   });
   });
   return this;
   return this;

Revision as of 06:28, 17 September 2012