Created
August 8, 2012 18:05
-
-
Save abrudtkuhl/3297121 to your computer and use it in GitHub Desktop.
WordPress comments.php for Responsive Facebook Comments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="fb-comments"data-href="<?php the_permalink(); ?>" data-num-posts="2" mobile="false"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* facebook comments */ | |
.fb-comments, .fb-comments iframe[style], .fb-like-box, .fb-like-box iframe[style] {width: 100% !important;} | |
.fb-comments span, .fb-comments iframe span[style], .fb-like-box span, .fb-like-box iframe span[style] {width: 100% !important;} |
Bummer, it seems that Facebook altered their plugin? This doesn't work for me, and it looks like they're using some sneaky JS to prevent changing width on at least one of the divs...
Does this still work for you?
Indeed, the CSS solution does not work anymore.
http://stackoverflow.com/questions/22187961/responsive-facebook-comments-css-hack-broken
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this... it's always annoying to dig back to old projects when I want to remember how I did this.