: Is it possible to add a facebook 'like' button to a website without the numer of 'likes'? I'm pretty sure this used to be possible, but there doesn't seem to be an option any more. Is
I'm pretty sure this used to be possible, but there doesn't seem to be an option any more. Is there any way to do it?
More posts by @Holmes151
3 Comments
Sorted by latest first Latest Oldest Best
You could do it with fb:like:layout="button" and avoid the need to use .css all together. Learn more by reading Facebook's API on their Like button.
For some reason facebook has decided not to allow the like count to be hidden, but with a little CSS magic you can come close. Just but a div block on top of the like count having the same color as the background. For an example, see warpdrivesoftware.com
Add a facebook_hide_count div after your button:
<div class="fb-like" data-href="http://warpdrivesoftware.com" data-send="false" data-layout="button_count" data-show-faces="false"></div>
<div class="facebook_hide_count"></div>
And add this to your CSS file:
.facebook {
position: relative;
width: 46px;
height: 21px;
}
.facebook_hide_count {
width: 100px;
height: 21px;
background: white;
position: absolute;
left: 46px;
top: 0;
}
Naturally, this only works if your like button is in English. If not, simply adjust the pixel count to whatever fits your locale.
You can hide the number of likes by using setting the dimensions of the like button to be smaller then its content. That will in effect hide the total.
Example:
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.example.com/" show_faces="false" width="450"></fb:like>
could be changed to this:
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.divorcemyteam.com/" show_faces="false" width="100"></fb:like>
That should cut off the count of likes for that page.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.