Reputation: 55
this is driving me crazy: I have this fancybox 2.1.3 that opens images but if I resize the window the image won't resize. This is weird because everything looks ok in the code and if I use the fancybox to open a blog post it fit and resize nicely. Only Images are f*** up...here the example (not the proper website I'm doing):
http://www.brunoferraroph.altervista.org/wordpress/trattamenti/
javascript settings:
defaults: {
padding : 15,
margin : 20,
width : 800,
height : 600,
minWidth : 100,
minHeight : 100,
maxWidth : 9999,
maxHeight : 9999,
autoSize : true,
autoHeight : false,
autoWidth : false,
autoResize : true,
autoCenter : !isTouch,
fitToView : true,
aspectRatio : false,
topRatio : 0.5,
leftRatio : 0.5,
scrolling : 'auto', // 'auto', 'yes' or 'no'
wrapCSS : '',
fancybox 2.1.4 does the same, css seems working...please help :(
Upvotes: 0
Views: 736
Reputation: 945
The option autoSize should be setting autoHeight and autoWidth to true by default, but you seem to be overriding them there. Try setting those to true!
Edit: Found it! Set fitToView to true and it works.
Upvotes: 1