1

is there any way how to auto resize the iframe(canvas) to show all my content? I don't want the scrollbar. I tried every JS method and nothing worked.

Ginnyous
  • 33
  • 4

3 Answers3

0

Or...

jQuery(window).load(function(){
     FB.Canvas.setSize();
});

Wait till everything has loaded then reset the size.

DanV
  • 2,874
  • 3
  • 25
  • 39
0

I use this code and it works for all content height's, even when I need to decreased it:



window.fbAsyncInit = function() {
   FB.init({
      appId      : 'YOUR_APP_ID',
      status     : true,
      cookie     : true,
      xfbml      : true,
      oauth: true
   });

      FB.Canvas.setSize({height:600});
      setTimeout("FB.Canvas.setAutoGrow()",500);
};

red_alert
  • 1,728
  • 14
  • 23
0

It's possible but it's quite tedious. See this answer here: Resizing an iframe based on content

Community
  • 1
  • 1
citizen conn
  • 15,011
  • 3
  • 54
  • 78