#overlayWrapper { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.86); z-index: 1; } #overlayContent { background: white; position: fixed; top: 50%; left: 50%; transform: translateX(-50%) translateY(-50%); width: 70%; max-width: 40em; border: 2px solid #333350; margin: 1em; padding: 0em 1.5em; min-height: 6em; border-radius: 0.3em; }