2015-08-09 20:11:39 +00:00
|
|
|
function setCSS() {
|
2015-08-09 17:12:51 +00:00
|
|
|
var x = window.innerWidth;
|
2015-08-09 20:11:39 +00:00
|
|
|
|
2015-08-09 17:12:51 +00:00
|
|
|
x = x - 18; // maybe scroll bar
|
|
|
|
document.getElementById('center').style.width = x + "px";
|
|
|
|
document.getElementById('center').style.marginLeft = "-" + x/2 + "px";
|
2015-08-09 20:11:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
window.onload = setCSS;
|
|
|
|
window.onresize = setCSS;
|