问题
I just recently implemented the FB Like button, Google +1 button, Digg and Tweet buttons on my review pages, see here:
http://www.datesphere.com/reviews/dating-sites/geek2geek/
However, because the Facebook Like button changes width depending on whether someone has ever clicked "like", the spacing between buttons is inconsistent. Is there some way to dynamically set the width of the element depending on whether there are any like, OR (and I'm guessing this is easier) just show the little count box with a "0" in it if there are 0 likes instead of hiding it so that the element is always the same width?
Thanks!
回答1:
Put the Facebook like button inside a div with a fixed width and then it should be constrained to that width.
来源:https://stackoverflow.com/questions/6379361/dynamic-facebook-like-button-width-or-show-like-count-even-when-there-are-0-like