html, body { margin: 0; height: 100%; } .overlay { background-color: rgba(255, 255, 255, 0.5); transition: opacity 1s; opacity: 100%; } .center { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; margin: auto; align-items: center; justify-content: space-around; } .center > * { align-content: center; } .hidden { opacity: 0%; z-index: -1; } .chart-container { padding: 10vw; width: calc(100% - 20vw); height: calc(100% - 20vw); }