revised css and switched window.onload for window.addEventListener