The thing it is suppose to center winds up being way low, not in the vertical middle. Then if I resize or call the function later it works.
function fixstuff () { //document.getElementById("WElogo").style.zIndex = "10000"; document.getElementById("WEmiddle").style.top = window.innerHeight / 2 - (document.getElementById("WEmiddle").clientHeight / 2) + "px"; } //setTimeout(fixstuff, 2000); //<-- this works fixstuff(); // <--- this dont window.onresize = fixstuff;
1.4m articles
1.4m replys
5 comments
57.0k users