2012-04-26 11 views
1

私はWordPressに基づいてインターネットポータルを持っています。 1つのFacebook Likeボタン(右揃え)がありますが、右の他のボタン(Twitter、LinkedIn、およびGoogle+)に統合しようとすると、左側に移動します。私はそれらのすべての権利をどのように調整するのか分かりません。 CSSに関する知識があまりないので、私は助けを求めるのです。右のFacebook、Twitter、Google+、LinkedInのボタンを合わせるにはどうすればいいですか?

これが今ある方法です:

これは私がそれになりたい方法です:

これは私のsingle_post.phpコードです:

<?php the_content(); ?> 
<div class="clear"></div> 
<?php wp_reset_query(); ?> 
<?php wp_link_pages('before=<p class="pagination">&after=</p>'); ?> 
<div id="fb-root"></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/lt_LT/all.js#xfbml=1"; 
    fjs.parentNode.insertBefore(js, fjs); 
}(document, 'script', 'facebook-jssdk'));</script> 
<div class="fb-like" data-send="false" data-layout="box_count" data-width="700" data-show-faces="false" data-font="lucida grande"></div>  
<div class="clear"></div> 
</div> 
+0

[アニメーションのスタティックソーシャルボタン](http://www.jquery2dotnet.com/2014/01/static-social-button-with-animation.html) – Sender

+0

[固定された垂直の社会Share Button](http://www.jquery2dotnet.com/2014/09/fixed-vertical-social-share-button.html) – Sender

答えて

6

ねえ、私はあなたがこの

があなたのsocailアイコンのfloatプロパティを定義し、設計に応じて

マージン、パディング幅高さを定義しないべきだと思うのCss

.social{ 
float:right; 
    border:solid 1px green; 
} 
.fb, .twit, .share, .gplus{ 
float:left; 
    width:100px; 
    height:100px; 
    overflow:hidden; 
    border-left:solid 1px red; 
} 

HTML

<div class="social"> 
    <div class="fb">FB</div> 
    <div class="twit">TWIT</div> 
    <div class="share">Share</div> 
    <div class="gplus">Gp</div> 
</div> 

ライブデモhttp://jsfiddle.net/3ELc5/

+0

チェックマークはどこですか?これは最高の答えです! –

関連する問題