Return to Snippet

Revision: 55557
at February 11, 2012 03:56 by the_construct


Initial Code
<!--
    Paste this code at the bottom of each of your pages just before the closing </body> tag
    **Just don't forget to replace YOUR APP ID in the code below with guess what...? :o)
    
    ***You might have to refresh a few times to see the changes!
-->

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
	FB.init({
		appId : 'YOUR APP ID',
		status : true, // check login status
		cookie : true, // enable cookies to allow the server to access the session
		xfbml : true // parse XFBML
	});

</script>
<script type="text/javascript">
	window.fbAsyncInit = function()
	{
		FB.Canvas.setSize();
	}
	// Do things that will sometimes call sizeChangeCallback()
	function sizeChangeCallback()
	{
		FB.Canvas.setSize();
	}
	sizeChangeCallback();
</script>

Initial URL


Initial Description
Some FB apps are longer than the 800px default FB limit and most are designed to 520px. When your content is longer than the 800px default a verticle scroll bars appears and if you have a hard-coded width in your CSS of 520px this forces a horizontal scroll bar to appear when the verticle one does.

So lets get rid of the scroll bars once and for all!

Initial Title
Facebook Get Rid of Verticle Scroll Bars

Initial Tags
javascript, facebook

Initial Language
JavaScript