Fancybox box positioning?

How to change the location of the fancybox field? I want it to be positioned so that it floats right in my div container ...

Thanks for all your time and help!

+3
source share
3 answers

line 255 jquery.fancybox-1.2.6 has this bit of code

var itemOpts = {
  'left':       itemLeft,
  'top':        itemTop,
  'width':  width + 'px',
  'height': height + 'px'
};

change the value "left" to move the frame left or right

+2
source

You can influence wraper positioning for fine tuning using those:

$("#fancybox-wrap").css("margin-left","-75px");
$("#fancybox-wrap").css("margin-top","60px");

but you will have to adapt it to your needs, as well as calculate the size of the viewports.

+2
source

- jquery:

$("#fancy_outer").css({"float":"right","position":"static"});
+1

Source: https://habr.com/ru/post/1731831/


All Articles