Team:Kyoto/TimeLimit

From 2013.igem.org

(Difference between revisions)
 
Line 42: Line 42:
   }
   }
   wrapper.style.top = top + "px";
   wrapper.style.top = top + "px";
 +
 +
  var width = 1000;
 +
  if (window.innerWidth != undefined) {
 +
    width = window.innerWidth;
 +
  } else if (document.documentElement.clientWidth != undefined) {
 +
    width = document.documentElement.clientWidth;
 +
  }
 +
  if (width < 1000) {
 +
    wrapper.style.width = width + "px";
 +
    wrapper.style.marginLeft = (-width / 2) + "px";
 +
    var size = width / 5;
 +
    wrapper.style.fontSize = size + "px";
 +
    wrapper.style.lineHeight = size + "px";
 +
    wrapper.style.height = size + "px";
 +
    wrapper.style.marginTop = (-size/2) + "px";
 +
  }
}
}

Latest revision as of 14:55, 26 September 2013