Is it possible to set a fluid width for Facebook's social plugins?

Chaddeus picture Chaddeus · Jun 28, 2011 · Viewed 94.4k times · Source

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?

Answer

Jubair picture Jubair · Apr 21, 2012

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;
}