为什么Facebook按钮旁边的文字分为两行?

时间:2013-12-28 14:54:47

标签: html css facebook facebook-like

任何想法为什么Facebook按钮旁边的文字被分成2行?由于红色DIV的宽度允许,因此只需要一条线。感谢

enter image description here HTML

<div id="footer" class="top">
  <div class="wrapper">
    <div class="left">
      <div class="fb-like" data-href="https://www.google.be" data-layout="button" data-action="like" data-show-faces="false" data-share="true"></div>
      <!-- End fblike  --></div>
    <div class="right">&copy; 2013 ddss.com. Tous droits réservés.</div>
  </div>
</div>

CSS

.wrapper {
    position: relative;
    display: block;
    margin-right: auto;
    margin-left: auto;
    width: 1000px;
    overflow: hidden;

}
#footer {  
    position: relative;  
    left: 0;  
    bottom: 0;  
    height: 26px;  
    width: 100%;  
    background: #fff; 
    border-top: 5px;
    border-top-style: solid;
    border-top-width: thin;
    border-top-color: #124191; 
    padding-top: 8px;
}  


#footer .left {
    float: left;
    padding-left: 3px;
    color: #333;
    font-size: 12px;
    background: red;
    width:60%;
}
#footer .right {
    float: right;
    padding-right: 3px;
    text-align: right;
    font-weight: 600;
    font-size: 11px;
    background: green;
    width:37%;
}

1 个答案:

答案 0 :(得分:2)

尝试将数据宽度100%添加到类似fb的类中,如下所示:

<div class="fb-like" data-width="100%" data-href="https://www.google.be" data-layout="button" data-action="like" data-show-faces="false" data-share="true"></div>