You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
276 B
JavaScript
11 lines
276 B
JavaScript
15 years ago
|
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;
|