Igor Parra
Igor Parra

Reputation: 10348

How to horizontal align social share buttons?

I have seen several sites where these social share buttons looks perfectly horizontal aligned. Take in account that many of these buttons are iframes.
Here is my current painful situation: enter image description here

Upvotes: 1

Views: 2729

Answers (1)

Daniel Imms
Daniel Imms

Reputation: 50149

Change the margin-top on your iframes (or a div element above it) to negative values to have them line up. Use trial-and-error once you identify the correct elemtn until you get it right, for example using the following HTML:

<div id="twitter">
  <iframe/>
</div>
<div id="facebook">
  <iframe/>
</div>
<div id="digg">
  <iframe/>
</div>

The CSS would look something like this:

div#facebook 
{
  margin-top:-5px;
}
div#digg 
{
  margin-top:-10px;
}

Upvotes: 2

Related Questions