While developing a website for a client, he asked me to include facebook comments instead of standard wordpress form. After searching around for a bit I’ve found a great plugin: SEO Facebook Comments .
What really makes it good for me is that is easy, fast hold a copy of all the comments in the wordpress database (wow!).
The main point, after finding a good plugin was to be sure it was correctly displayed in my theme. It was not, of course, but the hard point, as all web designers know, is that the comment form is generated inside an iframe. Which means you can’t modify, for security reason, the style or the content of the iframe. What is called a cross-site protection.
After all what I needed was just to make it fit my article div and stopping it to eat 1280 pixels in height (what?!) on mobile devices.
Here are the css rules to make it works (as today 22/04/2013 ):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
/* fix the width*/ .fb_iframe_widget, .fb_iframe_widget span, .fb_iframe_widget iframe[style] { width: 90% !important; } /* fix height and put a scrollbar, in case of. */ .fb_ltr { height: 200px !important; overflow-y: scroll !important; } .fb_iframe_widget span{ height:200px !important; overflow-y: scroll !important; } |
Write me if they don’t work anymore, because thanks to facebook, classes changes frequently.
Happy styling!
Comments
No comments yet.