The page contains two buttons, from twitter and from facebook.
What I'm observing in Firefox 3.5.15 is:
- While the page is loading, the buttons are more or less aligned (I mean their bottom sides)
- When the page is loaded, the facebook button moves a few pixels down, so that it's bottom side is lower than the bottom side of the twitter button.
- If I reload the page, the buttons are again aligned, and remain in this state even after the page is loaded.
Can someone please explain what's going on and how to fix it?
Use this code here to make it work, refer to the vertical-align part. Change the number accordingly (Current is 7):
It seems that, as of today at least, that the issue comes from an odd alignment of the
<span>
tag that the javascript generates within the.fb-share-button <div>
. Here's my fix:All I did was add the CSS to my page:
This is a bit less opinionated than some of the answers here and isolates the change to only undoing the height adjustment on the Facebook share icon.
I know there have been many answers, but since I struggled with this and none here worked for me, I thought I'd add my 2 cents... As has been mentioned, the
span
has avertical-align: bottom;
and you need to override this. I must say, even though it runs counter to CSS theory, it would really be nice if you could simply "turn off" a CSS rule like this one. I mean, what the hell FB? Icons working one day; but not the next. That is the stupidest thing I've ever heard of, ever.Anyway...
...did it for me.
I realise that this questions was posted some time ago, but here is the solution that I use.
I fixed this by adding vertical-align:top (This is when using their new HTML5 markup). My facebook button code now looks like:
I also had to add zoom:1 and *display:inline IE7 hack so that buttons show side by side