[FIXED] How can I overlay a ProgressSpinner in PrimeNG?

Issue

I have a progressBar spinner like this :

<p-progressSpinner></p-progressSpinner>

I want to make it center and overlay. How can I do that ?

Thanks .

Solution

This works for me: Original Url

html

<div class="progress-spinner" *ngIf="true">
    <p-progressSpinner></p-progressSpinner>
</div>

css

.progress-spinner {
    position: fixed;
    z-index: 999;
    height: 2em;
    width: 2em;
    overflow: show;
    margin: auto;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

/* Transparent Overlay */
.progress-spinner:before {
  content: '';
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.53);
}

Answered By – Sampath

Answer Checked By – Senaida (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published