Solved: align like and tweet buttons in a row with CSS

When adding social buttons, more specifically Facebook like and Twitter tweet buttons to your site, sometimes you want to add them in a single row, left to right, side by side. 

When you paste the buttons’ code as is, they will remain a little bit misaligned. 

like tweet buttons in a row

 

The solution to align like and tweet buttons in a row is rather simple.

Add a style markup to the like button div.

style=”vertical-align:top; margin-top: -2px !important;”

This will overrule the like button’s positioning and now they’re both aligned to text top with the twitter button as pictured above. 

Enjoy!

Post Author: Tom Pai