Shrinking/expanding fancybox to fit varying iframe content

222 views
Skip to first unread message

jerome

unread,
Aug 2, 2011, 9:20:41 AM8/2/11
to fancybox
Has anyone ever had to load content via an iframe, then expand and
shrink the fancybox to fit the different pages within the iframe?

For example I might load some content via iframe that is 500x500,
within that content might be a link that leads to content that is
400x400 and I want fancybox to shrink to that size, and so on through
the flow of the pages.

JFK

unread,
Aug 2, 2011, 1:28:03 PM8/2/11
to fancybox
unless somebody proves me wrong, you cannot resize the fancybox opened
in iframe mode based on the size of the external page loaded, since
the computed size will be equal to the number of block elements in the
page (height) and the size of the viewport (width) ... actually, if
your resize your browser window the computed size will based on the
visible area (viewport) and not from a value coming from the active
page

so in a few words, you can't
Reply all
Reply to author
Forward
0 new messages