How to make Facebook comments widget a fluid width?

后端 未结 19 1526
执念已碎
执念已碎 2020-12-13 00:46

Is it possible to make Facebook\'s comments widget a fluid width? Their documentation shows a width field for the fb:comments xfbml or iframe which is specifie

19条回答
  •  星月不相逢
    2020-12-13 01:21

    I can't comment yet because my reputations not yet high enough, however there is a solution to this as of Dec 21, 2014

    for this to work in CSS:

    .fb_iframe_widget,
    .fb_iframe_widget span,
    .fb_iframe_widget iframe[style]  {width: 100% !important;}
    

    you MUST have the data-width="" section set to 100% within the FB plugin code i.e

    working example with fluid motion: http:www.unitedbiker.org

    Hope this helps everyone out, the idea is to override the iframe style to be 100% of the parent element, and to set the actual FB plugin to 100% of the iframe. This was my work around.

提交回复
热议问题