3

I recently installed Ajax Loader and it working great. However, I need some custom styling so, I can display the loading throbber in the center of the screen.

I can write my own CSS, But can't find the target class of Ajax Loader.

Looking forward for any help on this issue. Thanks in advance

1 Answer 1

2

To target the overlay you can use .ajax-progress and to target the throbber you can use .ajax-throbber.

Something like this would position the throbber on the center of the screen:

.ajax-progress {
  position: fixed;
  z-index: 99999999;
  background: rgba(255,255,255,0.6);
  text-align: center;
  width: 100%;
  height: 100%;
  top:0;
  left:0;
}

.ajax-throbber {
  left: 0;
  position:absolute;
  right:0;
  top: 50%;
  transform: translateY(-50%);
}
2
  • 1
    Thanks @ipwa, That's what I was looking for.
    – Abu Zafor
    Commented Feb 28, 2019 at 18:16
  • It's also good to add overflow: auto for the odd case when fixed content goes off screen, it allows for scrollbars so it isn't completely unreachable. It's not likely to happen if the throbber is small but it's still good practice.
    – prkos
    Commented Feb 28, 2019 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.