Positioning the fancybox box?

10,424

Solution 1

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

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

change the 'left' value to move the fancy box left or right

Solution 2

You can affect the positioning of the wraper for fine tuning using those:

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

but you will have to adjust it to your needs as well as calculating the viewport dimensions as well.

Solution 3

Try slipping something like this into your jquery:

$("#fancy_outer").css({"float":"right","position":"static"});
Share:
10,424
Nir Levy
Author by

Nir Levy

Updated on June 05, 2022

Comments

  • Nir Levy
    Nir Levy almost 2 years

    How do I modify the positioning of the fancybox box? I want it to be positioned so that it floats right within my container div...

    Thanks for all your time and help!