I'm developing a site around the "responsive design" concept, but the facebook social plugins are static width and "break" the layout when it's re-sized.
Using media queries, I've set the plugins to hide on low-res browsers (mobile, etc...). 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?
You can show your cover photo, posts, and friend's faces in the page plugin. Once you are satisfied with the appearance, click on the Get Code button to continue. Facebook will now show you two code snippets. Copy the first code snippet and paste it in your theme or child theme's header.
Social plugins, like the Like button, the Share button and comments, are tools that let you share your experiences on other websites with your friends on Facebook. Social plugins include: Like button; Tap Like to share and connect with things from other websites that you find interesting.
You can programatically convert any fb page url into the url fb allows you to insert into an iframe. Check their docs for more info. For fb pages it works perfectly.
none of these methods worked but using this idea, the following worked for me:
.fb-comments, .fb-comments span, .fb-comments.fb_iframe_widget span iframe { width: 100% !important; }
I found a solution using css. Inspiration came from this article http://css-tricks.com/2708-override-inline-styles-with-css/
.fb-comments, .fb-comments iframe[style] {width: 100% !important;}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With