GG. GG. - 7 months ago 13
HTML Question

Twitter and Facebook buttons alignment

Context



I want to display Twitter and Facebook buttons on my new site.

But I get an issue with alignment.

enter image description here

Code



:

<span id="social">
<a href="https://twitter.com/share" class="twitter-share-button" data-via="guillaumgregoir">Tweet</a>
<div class="fb-like" data-href="http://csstooltip.com" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div>
</span>


:

#social {
display: inline-block;
margin-left: 24px;
}

div.fb-like {
display: inline-block !important;
margin-left: 100px;
margin-top: -20px;
}

Answer

remove margin top from your css - but you could use floats like below:

<div>
<div style='float:left;'>
--put a button here
</div>
<div style='float:left;'>
--put a button here
</div>
<div style='clear:both;'>
</div>
</div>