Answer the question
In order to leave comments, you need to log in
How to stretch the new (2017) facebook widget to the full width of the container?
Hello, on Facebook for developers I create a page plugin for the site, I check the box "Adapt to the width of the plugin container" gives the following codes:
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/ru_RU/sdk.js#xfbml=1&version=v2.8";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-page" data-href="https://www.facebook.com/gymandbalance" data-height="160" data-small-header="true" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/gymandbalance" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/gymandbalance">Balance</a></blockquote></div>
Answer the question
In order to leave comments, you need to log in
Here is what facebook replied:
Hi Andrew,
Please try to add data-width="500" while still keeping the data-adapt-container-width="true"
Also note that the plugin's max width is 500px, so if your container is wider than 500px, it will not fit the whole container. But if it is smaller than 500px, it will fit in the container.
Best,
Gunay
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question