?
Solved

Aligning Google plus one and Facebook networking buttons

Posted on 2011-09-24
3
Medium Priority
?
1,064 Views
Last Modified: 2012-05-12
I want to align Facebook and Google plus one buttons horizontally.

The code I've written is as below. The buttons align in Chrome and Firebox but in IE they are split into two lines.

How do I align them using CSS and without using tables so that the code works in IE as well?

<div id="shares">
<span><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.example.com" show_faces="false" width="300" font="lucida grande"></fb:like></span>
<span><g:plusone size="medium" annotation="inline" width="300" href="http://www.example.com"></g:plusone></span>
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>
</div>

Open in new window

0
Comment
Question by:noobie210
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
Dean OBrien earned 2000 total points
ID: 36593194
try:

<style>
span {height:30px;vertical-align:middle}
</style>
0
 

Author Comment

by:noobie210
ID: 36595015
It works. For anyone else who is interested the new code is as below: Hope this is right, easynow111?
<div id="shares">
<span class="facebook" style="height:30px;vertical-align:middle;"><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.example.com" show_faces="false" width="400" font="lucida grande"></fb:like></span>
<span class="google" style="height:30px;vertical-align:middle;"><g:plusone size="medium" annotation="inline" width="300" href="http://www.example.com"></g:plusone></span>
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

Open in new window

0
 
LVL 12

Expert Comment

by:Dean OBrien
ID: 36595044
Glad it works, it was a stab in the dark really, wasnt sure how google/fb would output.

Cheers for points.

Easynow
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question