Paul Paul - 1 year ago 56
HTML Question

How do I get these buttons inline?

I'm struggeling a bit with the sharebuttons for social media (Twitter, Facebook, Google+) because the facebook button is a few pixels more down than the other two.
I have the feeling I tried everything in my knowledge, by adding or removing divs, margin, padding etc.

This is the HTML code:

<div class="sharebuttons">
<div class="sharebutton"><div class="fb-share-button " data-layout="button" data-mobile-iframe="false"></div></div>
<div class="sharebutton"><a href="" class="twitter-share-button">Tweet</a></div>
<div class="sharebutton"><div class="g-plus" data-action="share" data-annotation="none"></div></div>

And the only CSS code from my part:


And the result is this:

enter image description here

Answer Source

You can add just float:left and some width looking for your site:

.sharebutton {
  display: inline-block;
  float: left;