I am creating a responsive design, but run into a problem when the JavaScript JavaScript code for Facebook div#fb-root causes a horizontal scrollbar when the browser width is less than 590 pixels. I tested this on Chrome, Safari and Firefox, but the problem only occurs in Firefox.
Should I just set div#fb-root to display:none or is there a better way to do this?
Thanks!
EDIT: As requested, below is the code for how I download the SDK. When I do not load the SDK, the horizontal scroll bars disappear.
<div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId : 'xxxxxxxxxxxxxxx', // App ID channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); // Additional initialization code here }; // Load the SDK Asynchronously (function(d){ var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/all.js"; d.getElementsByTagName('head')[0].appendChild(js); }(document)); </script>
source share