I was all working great until I upgraded to 2.0.0. I'm not sure what I had before. No matter how many parents, CSS, or 'Top' adjustments, I can't get the spinner to center vertically. However, in some situations that I cannot explain, it doesn't work horizontally either. Horizontally, everything is fine.
What I have tried:
- CSS position
- CSS margin
- CSS padding
- CSS top and bottom
- Adding/Removing a parent element or container (with all CSS above)
- Adjusting the 'top' attribute
My prefered configuration:
var spinner = {
lines: 11, // The number of lines to draw
length: 22, // The length of each line
width: 10, // The line thickness
radius: 32, // The radius of the inner circle
corners: 0.5, // Corner roundness (0..1)
rotate: 0, // The rotation offset
direction: 1, // 1: clockwise, -1: counterclockwise
color: '#000', // #rgb or #rrggbb or array of colors
speed: 1.5, // Rounds per second
trail: 64, // Afterglow percentage
shadow: false, // Whether to render a shadow
hwaccel: false, // Whether to use hardware acceleration
className: 'spinner', // The CSS class to assign to the spinner
zIndex: 2e9, // The z-index (defaults to 2000000000)
//top: 'auto', // Top position relative to parent in px
//left: 'auto' // Left position relative to parent in px
};
Note: I use the jQuery plugin