Answer the question
In order to leave comments, you need to log in
Why doesn't fancybox center align the window?
Fancybox 3 doesn't want to align the window vertically. The popup is nailed to the top of the window. I tried to completely remove my styles, I tried to prescribe fancybox parameters in js like this:
$("#special").fancybox({
'title' : 'SPECIAL OFFERS',
'width' : 630,
'height' : 465,
'autoScale' : true,
'autoDimensions' : true,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'speedIn' : 200,
'speedOut' : 200,
'overlayShow' : true,
'centerOnScroll' : true,
'easingIn' : 'easeOutBack',
'easingOut' : 'easeInBack',
'type' : 'image'
});
Answer the question
In order to leave comments, you need to log in
in 2 the topRatio parameter set the position from the center, expressed in decimal fraction, try topRatio: 0.5 - it should be in the center.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question