Closed EricG-Personal closed 9 years ago
The reason why I was expecting the spinner to be inside of the red box is because the documentation says:
"Since version 2.0.0 the spinner is absolutely positioned at 50% of its offset parent. You may specify a top and left option to position the spinner manually."
and the comments for the opts parameters say:
top: '20%', // Top position relative to parent left: '20%' // Left position relative to parent
They both say the position should be relative to the parent. Is not the red div the parent of the spinner?
So, in my case, the spinner should be offset from the top, left of the red div by 20% of the size of the red div.
What am I missing? Or have I done something wrong?
The offset parent
ist the closest ancestor that has position: relative / absolute / fixed;
which isn't necessarily the element's parent element. You can fix your issue by adding position: relative
to the div.centered
rule.
Confirmed. Thank you. You may want to find some nice way of explaining this in the documentation for those like me who are not necessarily experts in CSS layouts.
Fixed in master. Will be deployed in the next release.
I am sure I am doing something silly, but for some reason I cannot get the spinner to end up in my div. I have a simple test case, consisting of a single html file, which I have shown below.
Here is what it looks like when rendered. I was expecting the spinner to be inside of the red div.