zmianę trzeba zrobić w js, ponieważ odstęp od górnej krawędzi jest wyliczany, otwórz plik js, w moim przypadku jest to: jquery.fancybox-1.3.1.js, i tam jest funkcja
fancybox_get_zoom_to = function ()
przed samym
return to;
wstaw
to.top = 100;
czyli dokładniej tak:
fancybox_get_zoom_to = function () {
var view = fancybox_get_viewport(),
to = {},
margin = currentOpts.margin,
resize = currentOpts.autoScale,
horizontal_space = (shadow + margin) * 2,
vertical_space = (shadow + margin) * 2,
double_padding = (currentOpts.padding * 2),
ratio;
if (currentOpts.width.toString().indexOf('%') > -1) {
to.width = ((view[0] * parseFloat(currentOpts.width)) / 100) - (shadow * 2) ;
resize = false;
} else {
to.width = currentOpts.width + double_padding;
}
if (currentOpts.height.toString().indexOf('%') > -1) {
to.height = ((view[1] * parseFloat(currentOpts.height)) / 100) - (shadow * 2);
resize = false;
} else {
to.height = currentOpts.height + double_padding;
}
if (resize && (to.width > (view[0] - horizontal_space) || to.height > (view[1] - vertical_space))) {
if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {
horizontal_space += double_padding;
vertical_space += double_padding;
ratio = Math.min(Math.min( view[0] - horizontal_space, currentOpts.width) / currentOpts.width, Math.min( view[1] - vertical_space, currentOpts.height) / currentOpts.height);
to.width = Math.round(ratio * (to.width - double_padding)) + double_padding;
to.height = Math.round(ratio * (to.height - double_padding)) + double_padding;
} else {
to.width = Math.min(to.width, (view[0] - horizontal_space));
to.height = Math.min(to.height, (view[1] - vertical_space));
}
}
to.top = view[3] + ((view[1] - (to.height + (shadow * 2 ))) * 0.5);
to.left = view[2] + ((view[0] - (to.width + (shadow * 2 ))) * 0.5);
if (currentOpts.autoScale === false) {
to.top = Math.max(view[3] + margin, to.top);
to.left = Math.max(view[2] + margin, to.left);
}
to.top = 100;
return to;
},