Facebook's smaller Like-Box width has changed to 292px. Any way to change this behavior?

I just noticed a change in one of my html layouts.

Everything looked messy, and after searching, I found out that the reason is that Facebook Like Box (whose minimum width seems to have changed to 292px) was an insisde 250px container.

https://developers.facebook.com/docs/reference/plugins/like-box/

I had a similar box for many years in width = 220px, and it looks like Facebook has changed this β€œlegacy” behavior. The box had its place on my site, and now I need to figure out where to put it.

In my current website layout, it is not possible to move Facebook as a field elsewhere; so I had to delete if at the moment.

Any ideas why Facebook did this, and if there is any workaround?

Thanks,

Dan

+4
source share
2 answers

I don't know why Facebook did this, but you can easily set your own width using CSS:

.fb-like-box span, .fb-like-box iframe { width: 220px !important; } 
+7
source

There is a data-width div attribute to control the width.

The code below 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> 
0
source

Source: https://habr.com/ru/post/1486079/


All Articles