I've just noticed a change in one of my websites html layout.
Everything looked messy and after searching i found out that the cause was that the Facebook Like Box (which min width seems to have changed to 292px) was insisde a 250px container.
https://developers.facebook.com/docs/reference/plugins/like-box/
I've had the like-box there for years widh a width=220px and it's kind of awckard that Facebook changed this "legacy" behavior. The box had its place on my site and now i need to figure out where to put it.
With my current website layout it's impossible to move the facebook like box in a different place; so i had to remove if for now.
Any ideas why Facebook did this and if there's any workaround?
Thanks,
Dan
I don't know why Facebook has done it, but you can easily set your own width using CSS:
.fb-like-box span, .fb-like-box iframe {
width: 220px !important;
}
There is a data-width
attribute of the div to manage the width.
The below code is working absolutely fine.
<div class="fb-like-box" data-width='260' data-href="https://www.facebook.com/FacebookDevelopers" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>
来源:https://stackoverflow.com/questions/17093685/facebook-like-box-min-width-changed-to-292px-any-way-to-change-this-behavior