Fancybox width not applying

Webnet picture Webnet · Feb 12, 2011 · Viewed 31.9k times · Source

Using the following JS the width isn't being adjusted. It doesn't get adjusted when I use '750' or '750px'

$('a#city-prompt').fancybox({
    'width': 750
});

I've posted on the fancybox forums about this and haven't gotten a response

Answer

Felix Kling picture Felix Kling · Feb 13, 2011

You probably have to set autoSize to false:

$('a#city-prompt').fancybox({
    'width': 750,
    'autoSize': false
});

About width from the documentation:

Width for content types 'iframe' and 'swf'. Also set for inline content if 'autoDimensions' is set to 'false'