I am using this code to center a custom ajax spinner for gravity forms submission.
The spinner is centered based on the location of the gravity forms. I would like the spinner to be always centered horizontally and vertically, irrespective of the scroll position of the user.
In addition, the semi-transparent background overlay
background-color: rgba(255,255,255,0.5)
does not work. I have tried different variations, but I couldn't get a semi-transparent full page background overlay for the spinner./* Absolute Center Spinner */ .gform_wrapper .gform_ajax_spinner { position: fixed; z-index: 999; overflow: show; margin: auto; top: 0; left: 0; bottom: 0; right: 0; width: 120px; height: 120px; } /* Transparent Overlay */ .gform_wrapper .gform_ajax_spinner:before { content: ''; display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255,255,255,0.5) !important; }