Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Custom Share/Send/Social Media buttons WordPress

  • SOLVED

Example page: [[LINK href="http://tourkick.com/tours/20110715-2136-east-22nd-place-tulsa-ok-74114-2/"]]http://tourkick.com/tours/20110715-2136-east-22nd-place-tulsa-ok-74114-2/[[/LINK]] - scroll down and click on Share and Send.

Goal: customized/more control share buttons

Current status: Functionality is fine but style isn't because they're not lining up correctly.

Potential Resolution: Maybe it's just a simple CSS fix. Maybe something else.

Answers (2)

2011-11-06

Luis Cordova answers:

for this just add a css line:


div#share {
vertical-align: middle !important;
}


so to override the vertical-align: baseline; given to this div


<div id="share"> <---- which currently is baseline
....
</div>


Clifford P comments:

So keep them in a single-row table?


Luis Cordova comments:

no

you don't touch the html,

you will just add 1 line to the css styling sheet as i said above, very simple

if you don't know how to do it i can help you, send me a private message.

Thanks!


Clifford P comments:

I figured no tables (the HTML I already had in there), so I removed the table tags.

Here's the table-less HTML:

<div id="share">
<a class="sharer" href="http://www.facebook.com/sharer/sharer.php?u=<?php the_permalink() ?>&t=<?php the_title(); ?>" target="_blank"><span class="sharetext">Send</span></a>
<div id="fb-root" style="display:inline; width:5px;"></div><script src="http://connect.facebook.net/en_US/all.js#appId=147623558650701&amp;xfbml=1"></script><fb:like href="<?php the_permalink() ?>" send="false" layout="button_count" width="5" show_faces="false" font="verdana"></fb:like>
<a class="twitter-share-button" href="http://twitter.com/share" data-text="<?php the_title(); ?>" data-url="<?php echo ShareAndFollow::shortenURL(get_permalink($post->ID), $post->ID) ?>" data-counturl="<?php the_permalink() ?>" data-count="none" data-via="TourKick">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<div class="g-plusone" data-annotation="inline" data-width="120"></div>
</div>


I added this to the end of the style.css:

div#share {
vertical-align: middle !important;
}


And I attached a screenshot of how it looks in IE9, highlighting how they're not all aligned on the bottom.

So not fixed, but I'm REALLY hopeful someone can get this right. Thanks!