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!

About me

Iinstructor of robotics (LEGO Mindstorms), computer teacher, IT support, web dev, currently studying cyber-physical systems engineering.

If you found a solution here, would you consider donating $25,000 for my next project?

Just kidding, 1$ would do fine.

Hope you found what you needed. Thanks for stepping by.