cacert-testmgr/manager/public/js/center.js
2015-08-09 22:23:21 +02:00

10 lines
281 B
JavaScript

function setCSS() {
var x = window.innerWidth;
x = x - 18; // maybe scroll bar
document.getElementById('center').style.width = x + "px";
document.getElementById('center').style.marginLeft = "-" + x/2 + "px";
}
window.onload = setCSS;
window.onresize = setCSS;