jQuery Plugin To Scale An Element According Window Size - fitToParent !Yugal, thanks for the explanation! even the other top-google-result stackoverflow question's answers didn't cut it. Group Plugin. You Thank you !! Featured on Meta Free 30 Day Trial iframeTracker is a jQuery plugin which allows for the tracking of click events on iframes embed in your webpage that can be used for many applications: tracking click event of Facebook like button, Google +1 button, Google Adsense ads and many more.
Thanks!This issue has now been fixed by facebook, you can now set the width option to Not sure that works for the comments box as fb hard codes a pixel width inside its iframe, which can't be altered. What i've done so far was going to the Facebook Developpers for the new Page Plugin, included correctly (i hope) the SDK, included the script and pasted the html code the generator gave me.. (the width is forced by javascript and FB plugin loaded via javascript)This will make the Facebook Page Plugin responsive, but I'm still trying to figure out how to make it truly dynamically responsive, in spite of Facebook's caveat (I'll post an update if I ever find the answer).The Page plugin works with responsive, fluid and static layouts. It loaded on refresh though. Making the above css: Facebook suggests rerendering the content, but I'm not sure how to do that. However, on desktop browsers, when the browser window is re-sized smaller, but not so small to hide the plugins, they break out of the layout.Any way to set a fluid width for the Facebook social plugins?The correct working answer is a combination of things I found here. Facebook now sets the width of a div inside the iframe.good to know... thanks! Thank you so much! If you want this code to work for the page plugin, change the class-name 'fb-comments' to 'fb-page':none of these methods worked but using this idea, the following worked for me:I found a solution using css. resize well in portrait/landscape switching situations. I had to add this to my stylesheet...The .fb_iframe_widget and .fb_iframe_widget[style] both seemed to be important.I've got this working using this simple script (see code in link).You have to make a few changes to the information so that you are using your Facebook App ID and your page URL.This solution is using jQuery so you'll have to understand how that work but once you get the script to execute your responsive design will work on page load or when resizing the page.An important note about this resize stuff: If the Facebook comment script detects that you're on a mobile device it breaks this. This amended CSS from what was shared above did the trick.Here is some jquery that should persist across changes to the output markup as it uses a regex expression to rewrite the width only, leaving the rest of the style tag alone.You need to specify the correct container id or selector, replacing my example of: #footer-last. your coworkers to find and share information. Use the inspect element to see what code is being generated. While you can change colors and some sizing making it responsive is still very buggy. Unlike like-box, this plugin enforces its limits by sticking to the boundary values if mis-configured. I am using the HTML5 version of the like button:The "div.main-content" element is the element that the like button must fit into in my design. Save Button. Mikel's answer is a good start:We have pushed a fix for this. Here is an example:To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Facebook now sets the width of a div inside the iframe.That might have worked in the past, but facebook has updated their code, so this no longer works.Wonder if that is a new capability? Is it possible to reflect this things on like-share plugins too ?This works on the page plugin, provided you change the class names from 'fb-comments' to 'fb-page'. From now on, you can specify the width To make it true responsive add this to your CSS:This will cause the plugin to adapt to the currently availably space when you resize the browser If you are using the official wordpress facebook plugin due to the mobile sniffing facebook do.The mobile version will automatically show up when a mobile device Preserving Aspect Ratio For iFrames - jQuery keep-ratio. I would like to see an answer to this question from somebody that is more of an expert on this subject. site design / logo © 2020 Stack Exchange Inc; user contributions licensed under I have a combination of your solution, with added .fb-comments, .fb-comments iframe[style], .fb-comments span {width: 100% !important;} in the CSS, which made it nicely responsive! Just like on Facebook, your visitors can like and share the Page without leaving your site.