Pritom
Pritom

Reputation: 1333

Remove horizontal and vertical scrollbar from facebook apps

I have created a facebook apps. It works fine for me. But my problem is that always show vertical and horizontal scrollbar, when I use fluid for both width and height of my page from facebook settings. My page looks like this http://karen.webmascot.com/fb/fbone.jpg. What can I do now?

Upvotes: 3

Views: 7648

Answers (2)

Marco Caltagirone
Marco Caltagirone

Reputation: 1206

Try to use overflow:hidden in your body CSS style.

Upvotes: -1

huhu
huhu

Reputation: 199

Set scroll=no and overflow:hidden to your body and use FB.Canvas.setAutoGrow() to remove the scrollbar.

<body scroll="no" style="overflow:hidden">
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function () {
    window.setTimeout(function () {
        FB.Canvas.setAutoGrow()
    }, 250)
};
(function () {
    var e = document.createElement('script');
    e.async = true;
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e)
}());
</script>

Upvotes: 7

Related Questions