html, body { height: 100vh; margin: 0; padding: 0; background: lightgrey; overflow: hidden; } #container { position: relative; width: 100vw; height: 100vh; background: white; border: 1px solid #ccc; overflow: hidden; } .graph-title { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); font-size: 32px; color: #333; z-index: 5; background-color: rgba(255, 255, 255, 0.8); padding: 5px 10px; border-radius: 5px; }