Jon
Jon

Reputation: 8531

Get Twitter Tweets and Facebook Likes on Same Line

I am having problems getting the Twitter Tweets and Facebook Likes to be on the same line. Currently, the Facebook Likes is a few pixels lower then the Twitter Tweets. How would I correct this?

I have tried adding a style to Twitter to bump the margin down a few pixels, but that also moved the Facebook down as well. I also tried adding negative margin to Facebook, but that did nothing.

I want to note that I haven't modified the Twitter/Facebook buttons with CSS in any way as all my attempts has failed.

.social {
    clear: both;
    padding: 10px 36px 20px 36px; 
}

<div class="social">
    <a class="twitter-share-button" data-url="http://www.google.com/" href="https://twitter.com/share" data-lang="en"></a>
    <div class="fb-like" data-href="http://www.google.com/" data-send="false" data-width="90" data-show-faces="false" data-layout="button_count"></div> 
</div>

/**** Twitter plugin ****/
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

/**** Facebook plugin ****/
<script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>

What I have:

enter image description here

Upvotes: 0

Views: 808

Answers (1)

Jon
Jon

Reputation: 8531

To fix this, I added float:left; to both the Twitter and Facebook lines of code.

Upvotes: 3

Related Questions