2012-02-04 80 views
1

上下文

我想在我的新網站上顯示Twitter和Facebook按鈕。Twitter和Facebook按鈕對齊

但我得到一個與對齊問題。

enter image description here

代碼

<span id="social"> 
    <a href="https://twitter.com/share" class="twitter-share-button" data-via="guillaumgregoir">Tweet</a> 
    <div class="fb-like" data-href="http://csstooltip.com" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div> 
</span> 

#social { 
    display: inline-block; 
    margin-left: 24px; 
} 

div.fb-like { 
    display: inline-block !important; 
    margin-left: 100px; 
    margin-top: -20px; 
} 
+0

必須有更多的CSS和/或JavaScript在這裏比賽。您提供的CSS無法完成圖片中顯示的內容。 – 2012-02-04 16:14:45

回答

2

從你的CSS刪除邊緣頂部 - 但你可以使用像下面的花車:

<div> 
<div style='float:left;'> 
--put a button here 
</div> 
<div style='float:left;'> 
--put a button here 
</div> 
<div style='clear:both;'> 
</div> 
</div> 
+0

它通過增加寬度的div,謝謝。 – 2012-02-04 16:30:29