Can't get the Share Button!

I am trying to align a share, for example, and a tweet button horizontally, but I can’t get a share button. I tried adding vertical height by changing the height and display: built-in, but it always stays more or less 10 pixels below the rest. What to do to align them in all respects?

<div style='vertical-align: top;'>

<a expr:share_url='data:post.url' name='fb_share'/> 

<a class='twitter-share-button' data-count='horizontal' data-lang='es' data-related=':' data-via='' expr:data-text='data:post.title' expr:data-url='data:post.url' href='http://twitter.com/share' rel='nofollow'/>

<iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.url + &quot;&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;font=arial&amp;colorscheme=light&quot;' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:110px; height:20px;'/>
</div>


<script src='http://static.ak.fbcdn.net/connect.php/js/FB.Share' type='text/javascript'>
</script>

<script src='http://platform.twitter.com/widgets.js' type='text/javascript'>
</script>

thank

+3
source share
2 answers

An easier way than styling these elements individually is to sandwich them inside the tags <li>, making it easy to position the parent <ul>as well as the floattags <li>(creating the 'inline' effect you need.)

jsFiddle API facebook, 3 ; :

<ul class="social_network">
    <li>
        <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="">Tweet</a>
    </li>

    <li>
        <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="">Tweet</a>
    </li>

    <li>
        <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="">Tweet</a>
    </li>
</ul>

CSS ( , <li>:

.social_network {
    position : relative;
    list-style-type : none;
}
.social_network li {
    float : left;
    border : 1px solid rgba(0,0,0,.1);
    padding : 6px;
    margin : 2px;
}

: http://jsfiddle.net/kgFaW/

. , API Facebook.

+7

: inline :

  <ul><li>
<a class=....../>
</li> <li> <a expr....../> </li></ul>

, : list-style-type: none; , : : ; : 0;

0

Source: https://habr.com/ru/post/1787047/


All Articles