Html 谷歌和Facebook按钮

Html 谷歌和Facebook按钮,html,css,google-plus,Html,Css,Google Plus,好吧,我在我的网站上添加了两个like和plusOne按钮,之后无论我怎么做,它们都不会保持对齐。 我试着添加一些CSS代码或其他东西,但他们只是不想呆在一起。对不起,我没有代码,因为这都是标准的,但我会给你一个截图,让你看到我的问题 编辑: 这是密码 <div id="social-holder"> <div class="fb-like" data-href="http://www.nslife.rs/profile.php?id=<?php echo $

好吧,我在我的网站上添加了两个like和plusOne按钮,之后无论我怎么做,它们都不会保持对齐。 我试着添加一些CSS代码或其他东西,但他们只是不想呆在一起。对不起,我没有代码,因为这都是标准的,但我会给你一个截图,让你看到我的问题

编辑: 这是密码

<div id="social-holder">

    <div class="fb-like" data-href="http://www.nslife.rs/profile.php?id=<?php echo $article_data_profile['id'];?>" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div>

    <div style="margin-left: 10px;" class="fb-share-button" data-href="http://www.naslife.rs/profile.php?id=<?php echo $article_data_profile['id']; ?>"data-type="button_count"></div>
    <!-- Place this tag where you want the +1 button to render. -->

    <div class="g-plusone" data-href="http://www.nslife.rs/profile.php?id=<?php echo $article_data_profile['id']; ?>">
</div>
</div>
检查

HTML代码
对不起,我没有代码,因为它都是标准的
。。。对不起什么?什么是标准?。。您需要提供代码。我们怎么知道那是什么?它是
div
s带
display:inline块
  • float:left
    display:inline
    的吗。没有代码,我们只是猜测。。。。提供代码。-修复了。我用html代码和css编辑了这个问题。用你给出的代码,我看不出在使用
    display:inline block
    时有什么问题。正如Jay所说,我已经编辑了下面的代码。它在分离特定类中的所有内容时效果非常好。我还需要更多的摆弄,但现在非常棒!谢谢你的支持!:)欢迎我很乐意帮助某人:)
    #social-holder{
        background-color: #F7F7F7;
        box-shadow: 0px 0px 10px rgba(0,0,0,0.5);
        padding-right: 10px;
        padding-left: 10px;
        margin-bottom: 10px;
        vertical-align: middle;
        height: 30px;
    }
    
        <div class="facebook_share">
            <div id="fb-root"></div>
            <div class="fb-share-button" data-type="button_count"></div>    
            <script>(function(d, s, id) {
              var js, fjs = d.getElementsByTagName(s)[0];
              if (d.getElementById(id)) return;
              js = d.createElement(s); js.id = id;
              js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=556409774418683";
              fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));</script>
        </div>    
        <div class="twitter_share">
            <a href="https://twitter.com/share" class="twitter-share-button" data-via="way2tutorial" data-related="way2tutorial">Tweet</a>
            <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
        </div>
        <div class="google_share">
            <div class="g-plusone" data-size="medium"></div>
            <script type="text/javascript">
              (function() {
                var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
                po.src = 'https://apis.google.com/js/platform.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
              })();
            </script>
        </div>
    
    div.facebook_share { 
      float: left;
      width: 150px;
      height: 40px;
      padding: 10px 0 0 0;
      /*margin-left: -17px;*/
      text-align: center; 
    }
    div.twitter_share { 
      float: left;
      width: 150px;
      height: 40px;
      padding: 10px 0 0 10px;
      margin-left: 20px;
      text-align: center; 
    }
    div.google_share { 
      float: left;
      width: 150px;
      height: 40px;
      padding: 10px 0 0 0px;
      margin-left: 20px;
      text-align: center; 
    }