ducin
ducin

Reputation: 26437

spin.js / angular-spinner: how to position spin into DOM element (plunker demo included)

I've found angular-spinner which is based on spin.js, and I want to use it. Anyway, the example found in angular-spinner's README (http://plnkr.co/edit/BGLUYcylbIVJRz6ztbhf?p=preview) doesn't work as I expect. I want the spinner to overlay the selected DOM element and not the global window.

I have modified the plunker: http://plnkr.co/edit/9xsi8OFui3VeYuZ810VZ?p=preview - here you can see that there is a <div> element with red background. The spinner is outside it - what can I do to make it centered inside the red-background div?

Upvotes: 1

Views: 3745

Answers (1)

Linh Pham
Linh Pham

Reputation: 3025

Add

position: relative;

in that red container

http://plnkr.co/edit/oPStHrLHXKUq3HE9pET0?p=preview

Upvotes: 1

Related Questions