Auto sizing inline FancyBox problem in IE7/IE9
This issue is new in Fancybox version 2.1. It does not occur when I use version 2.0.6.
I have created a demo to explain the problem. Basically, the Fancybox does not autosize to the correct height to contain inline code in IE7 or IE9. Both give different but incorrect behaviour. All other browsers including IE8 are absolutely fine. I can't work out if it's a big in my code, a bug in IE7/IE9 or if it's a problem with FancyBox itself, given that it does not occur in v. 2.0.6.
Here's the demo: http://jsfiddle.net/espressoist/Pzu9S/14/
Any help/advice much appreciated. Thanks in advance!
PS. Natively, I am actually running IE9 - but am testing using the IE7 and IE8 modes in developer tools to compare the behaviour.
You have not set width and that leads to unexpected results. Sorry, this can not be solved. But if you do, then please, share your fix.
Further testing indicates that the FancyBox also has a problem resizing to the correct height in other browsers (e.g. Chrome and Firefox) if the width of the browser window is decreased. Instead of causing a Fancybox with a greater height and smaller width, the Fancybox does not increase in height but adds a scrollbar. Again, not sure if it's a problem with Fancybox or if I missing something. Let me know if I can provide any more information such as screen shots etc. Thanks!
Ah, sorry, just saw your comment! So I need to hard code a width for the FancyBox? Thanks for your help!
Yes, you have to define the width inline or using CSS (or set option "minWidth").
Great, will try that. Many thanks for all your help.
I seem to be having this exact issue in IE7 with images that have captions. I am in version 2.0.6. Any recommendations? I can't set a width since I it's a set of images that are all different sizes.
@nicknameless270 First, upgrade to the latest (it is quite safe to update) and I also recommend separating captions from images, something like this - http://jsfiddle.net/AZMcp/