Facebook Scrollbar


February 27, 2012 at 07:55
CSS Facebook

Today I found out that the clearfix hack doesn't do so well with Facebook. To avoid scrollbars in a facebook tab:
body, html {
    overflow:hidden;
}
and before the closing body tag:
<div id="fb-root"></div>
<script type="text/javascript" src="https://connect.facebook.net/de_DE/all.js"></script>
<script type="text/javascript">
        
          FB.init({
          appId  : 'APP_ID',
          status : true,
          cookie : true,
          xfbml  : true,
          oauth : true
        });

        $(document).ready( function(){
            FB.Canvas.setSize({ height: $('body').height() });
            FB.Canvas.scrollTo(0,0);
        });

        </script>

Tags: facebook tab scrollbar


Hinterlasse einen Kommentar:
Search