howto: tweetmeme and facebook share buttons aligned

HELLO WORLD,

A super-fast post here, for those of you who are geeky, blogs/sites, but don’t know too much about html/javascript. I’m writing this as even if the problem is trivial, I googled a bit and couldn’t find any “copy’n’paste” kind of solution, so here you are.

The problem:  the tweetmeme and facebook share horizontal buttons are disaligned

“This kinda sucks” you’d think “since they’re the 2 most populare sharing button, why didn’t they make an effort to make them aligned by default?”. Good question. But still, wait to see what the “Google buzz” button looks like! :-O

Anyway, before finding this solution I created a table around the 2 buttons,  tried using  inline CSS (vertical-align and margin) to get them aligned and none worked. What did work was usign a div tag, just copy’n’paste the following code into your webpage and it should work fine:


<table>
<tbody>
<tr>
<td>
<div style=�float: left; margin-left: 0px; padding: 6px 0px 0pt;�>
<script type=â?text/javascriptâ?> tweetmeme_style = â??compactâ??;</script> <script type=â?text/javascriptâ? src=â?http://tweetmeme.com/i/scripts/button.jsâ?> </script>
</div>
</td>
<td>
<div style=�float: left; margin-right: 12px; padding: 4px 10px 0pt;�>
<a name=�fb_share� type=�button_count� href=�http://www.facebook.com/sharer.php�>Share</a><script src=�http://static.ak.fbcdn.net/connect.php/js/FB.Share� type=�text/javascript�></script>
</div>
</td>
</tr>
</tbody>
</table>


You can see the result on our forum.

Notes: always get the latest scripts from tweetmeme and facebook. As the buttons change, you may need to play around with the values a bit…


Edit: on this blog we’re currently using the amazing Digg Digg plugin and the wibiya toolbar (we’re still using the 2 buttons on our forum).

Comments
  1. Hey there , I am forming a new unique website and some of your original articles would really fit in well. Would you let me post think article for my readers?

  2. Thanks man… You Rock!

Reply To: howto: tweetmeme and facebook share buttons aligned

Scarica

Tabbles 4.2.0 (~ 19MB)
Compatibile con: Vista, 7, 8, 8.1, 10. Per l’utilizzo in LAN richiede Microsoft Sql Server Express 2008 o superiore.

Write us!

Do you have questions about Tabbles, or just want to say hi? Drop us a line and we'll get back to you:

Your Name (required)

Your Email (required)

Subject (required)

Your Message (required)

Subscribe to our Newsletter

WP User Control Widget

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close