cacert-testmgr/manager/public/js/center.js

11 lines
276 B
JavaScript
Raw Permalink Normal View History

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;