Vertically align Facebook and Twitter share buttons

Posted on May 14, 2019 at 2:08 pm

HTML code to vertically align Facebook and Twitter share buttons:

<div class="d-inline">
<style>.fb_iframe_widget span { vertical-align: baseline !important; }</style>
<div class="fb-like" data-href="http://www.yourwebsite.com/" data-layout="button_count" data-action="like" data-size="small" data-show-faces="false" data-share="true"></div> <a href="https://twitter.com/share?ref_src=twsrc%5Etfw" class="twitter-share-button" data-show-count="false">Tweet</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>

Please note that I added the inline CSS below:

.fb_iframe_widget span { vertical-align: baseline !important; }

The d-inline class is from Bootstrap 4.

Receive updates via email

Other Posts

Updated Posts