Showing posts with label scrollbar. Show all posts
Showing posts with label scrollbar. Show all posts

Friday, February 1, 2013

Remove horizontal and vertical scrollbar from facebook apps

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>
 
Follow the link. 
Remove-horizontal-and-vertical-scrollbar-from-facebook-apps