Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Like Button (<fb:like>) Height Always 80px

Why is the height of my Facebook Like button (technically the iframe that gets generated) always getting set to 80px? Example page is here: http://www.davidkasper.net/test.html I am using the javascript sdk and have had it work on other pages but for some reason the height will not change dynamically on this one! I can even do something like <fb:like style="height:40px"> and that will indeed set the visible height, but the iframe will still be 80px, whereas I can see it changing in the demo at http://developers.facebook.com/docs/reference/plugins/like

like image 924
Dave Kasper Avatar asked Jan 23 '23 03:01

Dave Kasper


2 Answers

The iframe being generated is allowing space for showing facebook profile pictures. Add the show-faces="false" attribute and it will collapse the height.

<fb:like show-faces="false"></fb:like>
like image 83
knorthfield Avatar answered Feb 12 '23 11:02

knorthfield


I fix this problem with css

#fb-bar iframe{min-height:80px !important;}

where #fb-bar is wrapper for < fb:like >. In html

<div id="fb-bar">
  <fb:like href="link"></fb:like>
</div>
like image 39
AexChecker Avatar answered Feb 12 '23 11:02

AexChecker