Currently, I am incorporating the Facebook XML to implement a Facebook comments plugin within my MVC 3 application in the following manner:
<fb:comments href="@Request.Url.AbsoluteUri" num_posts="15" width="900"></fb:comments>
The issue lies in the fact that the width attribute is only displayed in pixel values. Ideally, I would prefer to define a percentage width instead. Upon inspecting the HTML generated upon conversion by Facebook's JavaScript into full-qualified HTML, an iframe with inline CSS specifying the width is produced. This iframe contains a class of "fb_ltr", and despite attempting a CSS rule for .fb_ltr to modify the width, it proves ineffective due to the inline css as a style=""
attribute overriding this rule.
In an attempt to rectify this using jQuery:
$(function()
{
$('.fb_ltr').css('width', '100%');
});
Regrettably, this method also failed as the execution of the Facebook JavaScript takes some time to render the content. Have any individuals encountered similar challenges when customizing Facebook plugins? The process seems rather convoluted. Is there a way to apply jQuery adjustments after the completion of the Facebook script rendering the comments iframe?