Take the 2-minute tour ×

so we all know that fancybox have resize functionality and thats great, but if the content is larger than your screen it will resize as well and you have to scroll down with you browser scroll bars, not with fancybox scroll bars.

To resize without fast clutter I do like this.

<script type="text/javascript">
    jQuery(document).ready(function() {
            'titlePosition' : 'inside',
            'transitionIn'  : 'fade',
            'transitionOut' : 'fade',
            'onStart' : function()
                    marginLeft: '-10000px'
            'onComplete' : function()
                    marginLeft: '0px'

so my question is how to resize within your browser screen, or no more than a specific value, f.ex I want to autoresize, BUT no more than width: 800px; and height: 900px;

to illustrate what I have now, and what I want to achieve, here is some screens:

Current: alt text

Wanted: alt text

Any ideas?

share|improve this question

2 Answers 2

FancyBox as built in method to set width and height to the "window" generated to hold the content... check the website for further instructions, but here's a hit:

// initialize popup iframe (fancybox)
    'autoDimensions': false,
    'padding'       : 0,
    'width'         : 940,
    'height'        : 400,
    'autoScale'     : false,
    'transitionIn'  : 'none',
    'transitionOut' : 'none',
    'type'          : 'iframe'

Here I'm setting a popup with fixed 940px by 400px (it can be % values as well)... and if the content is larger then the fancybox holder, it will generate scroll bars on that same holder and not on the document itself!!!

PS: If I read your question right!

share|improve this answer
Yeah everything would be fine, if I would have big content all the time, but I need autoscale functionality as well, to get result like this: yfrog.com/7243150716p thats why I need a way to set maxHeigth and maxWidth somehow.... –  Lukas Šalkauskas Dec 9 '10 at 21:14
up vote 0 down vote accepted

Solved this problem by editing MyTagStyle:

share|improve this answer
Won't this sitll cause a scroll bar if the inner window size is less than 600px tall, such as on a netbook or tablet? –  JoeCoder Jan 5 '12 at 0:09

Your Answer


