Wherein I occasionally rant on various topics including, but not limited to, PHP, Music, and whatever other Topics I find interesting at the moment, including my brain tumor surgery of August 2010.

Monday, February 11, 2013

Facebook Scrollbars

For reasons beyond my ken, Facebook has a fluid-height IFRAME that seems to "not work" for a lot of people.

Probably people like me who know just enough CSS to be dangerous.

You can Google for various wordings of the problem, and find half a dozen equally good solutions.

Except the ones that use FB.Canvas.setAutoSize, because that's been replaced by the seemingly the same behavior FB.Canvas.setAutoGrow.  So you have to change your code for a (meaningless?) backwards incompatible change. Thanks Facebook. Again. But I digress.
(I welcome comments that explain why this function was renamed.)

You can Google for the FB.Canvas.setAutoGrow solution, but here's a TIP:

If you attempted to get your application to "fill" the page by adding height: 100%; to your CSS, it sort of worked sometimes, but not others, and so you turn to the real solution above...

When you do that, it does NOT work. The 100% "fights with" the FB code to produce, shall we say, less than desirable results, like making your page roughly a mile high.

TIP Rip out those "height: 100%;" CSS attributes.