function fadeInBackground() { document.body.classList.add('fade-in'); } setTimeout(fadeInBackground, 1000); function updateDivSize() { const divWindow = document.getElementById('divWindow'); //const divContents = document.getElementById('divContents'); const windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; const windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; const adjustedWidth = windowWidth - 20; const adjustedHeight = windowHeight - 20; divWindow.style.width = adjustedWidth + 'px'; divWindow.style.height = adjustedHeight + 'px'; //divContents.textContent = `Width: ${adjustedWidth}px, Height: ${adjustedHeight}px`; } window.addEventListener('resize', updateDivSize); updateDivSize();