Skip to content

Instantly share code, notes, and snippets.

@smeranda
Created May 1, 2012 20:37
Show Gist options
  • Select an option

  • Save smeranda/2571173 to your computer and use it in GitHub Desktop.

Select an option

Save smeranda/2571173 to your computer and use it in GitHub Desktop.
Flexible width layout for Facebook Like Box/Activity Stream to use in Responsive Designs
/*
Make the Facebook Like box responsive (fluid width)
https://developers.facebook.com/docs/reference/plugins/like-box/
*/
/* This element holds injected scripts inside iframes that in some cases may stretch layouts. So, we're just hiding it. */
#fb-root {
display: none;
}
/* To fill the container and nothing else */
.fb_iframe_widget, .fb_iframe_widget span, .fb_iframe_widget span iframe[style] {
width: 100% !important;
}
@flyarrowplane

Copy link
Copy Markdown

Also having the same iPad issue... same thing happens on my Samsung Galaxy (android).

@jamesxv7

Copy link
Copy Markdown

For the iPad issue, since the properties you want to modify are inside the iframe, there is no way to achieve a fully reponsive fix because the CSS does not work cross domain.

ghost commented Feb 18, 2014

Copy link
Copy Markdown

Many thanks!

@afroewis

Copy link
Copy Markdown

Thank you, works perfectly

@Tezting

Tezting commented Mar 5, 2014

Copy link
Copy Markdown

They have now added:

id="feedback_xxxxxx" style="width: 470px;"

In the iFrame, so this solution is not enough anymore...

@Morpho

Morpho commented Mar 5, 2014

Copy link
Copy Markdown

Does not work anymore, just noticed the same :/
Should we open a new bug report on Facebook?

@Morpho

Morpho commented Mar 5, 2014

Copy link
Copy Markdown

Please subscribe here everybody who is affected: https://developers.facebook.com/x/bugs/256568534516879/

@mahdavi1456

Copy link
Copy Markdown

Hi,
tnx , its very useful and easy to use.

@jesseshowalter

Copy link
Copy Markdown

Thanks so much, this did the trick

@emblisha

emblisha commented Sep 2, 2014

Copy link
Copy Markdown

thanks soo much it works great

@urmilshah13

Copy link
Copy Markdown

perfect

@godatait

Copy link
Copy Markdown

thank!

@gordonbanderson

Copy link
Copy Markdown

I've just resolved a similar issue using the CSS from http://stackoverflow.com/questions/24712583/make-a-facebook-like-box-responsive - however full width page responsive still leaves half the page blank on a 1600px wide monitor :(

@kennyjamell

Copy link
Copy Markdown

Thanks a lot!! it works perfectly for me!

@hoangthien0291

Copy link
Copy Markdown

Thanks, copy -> paste in css file and done...

@Nashu99

Nashu99 commented Dec 13, 2014

Copy link
Copy Markdown

Thank you, works perfectly

Happy New Year 2015 Wallpapers

http://happynewyear2015wallpapersimages.blogspot.in

@ypawany

ypawany commented Jan 17, 2015

Copy link
Copy Markdown

Thank you so much, it's working perfectly.

@saosangmo

Copy link
Copy Markdown

Do not work for me. Could you reiview it?
http://huongnghiepnhatban.com
many thanks

@JillianKay

Copy link
Copy Markdown

Thanks smeranda:

I've seen this one on http://www.urgentfiles.com/ but didn't find coding, Now you really help me with finding this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment