A
A
Anarchy2018-02-26 20:34:52
JavaScript
Anarchy, 2018-02-26 20:34:52

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'
});

What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
ThunderCat, 2018-02-27
@ThunderCat

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 question

Ask a Question

731 491 924 answers to any question