DASHBOARD HOME TUTORIAL TEMPAHAN MY DESIGN

tutorial floating share button

macamana nak buat share button (facebook like and share, tweet, google+1) yang float kat blog macam ni:


macam ni caranya..

1. login akaun blogger korang > Layout > Add a Gadget > HTML/Javascript

2. kosongkan ruang title. copy kod kat bawah ni, paste kat ruang bawah title tu :

<style>
#pageshare {position:fixed; bottom:15%; left:135px; float:left; border: 1px solid #ffffff; border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:#ffffff;padding:0 0 2px
0;z-index:10;}
#pageshare .sbutton {float:left;clear:both;margin:5px 5px 0 5px;}
.fb_share_count_top {width:48px !important;}
.fb_share_count_top, .fb_share_count_inner {-moz-border-radius:3px;-webkit-border-radius:3px;}
.FBConnectButton_Small, .FBConnectButton_RTL_Small {width:49px !important; -moz-border-radius:3px;-webkit-border-radius:3px;}
.FBConnectButton_Small .FBConnectButton_Text {padding:2px 2px 3px !important;-moz-border-radius:3px;-webkit-border-radius:3px;font-size:8px;}
</style>
<div id='pageshare' title="jom kongsi dengan kawan-kawan korang">
<div class='sbutton' id='gb'><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like layout="box_count" show_faces="false" font=""></fb:like></div>
<div class='sbutton' id='rt'><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" >Tweet</a><script src='http://platform.twitter.com/widgets.js' type="text/javascript"></script></div>
<div class='sbutton' id='gplusone'><script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script><g:plusone size="tall"></g:plusone></div>
<div class='sbutton' id='fb'><a name="fb_share" type="box_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div><br/><div style="clear: both;font-size: 9px;text-align:center;"></div></div>
penerangan kod:

a) 135 : adjust nilai ni untuk adjust kedudukan widget tersebut
b) left : kalau korang nak widget ni muncul kat sebelah kanan, just tukar left tu kepada right
c) #ffffff : warna border widget tu
d) #ffffff : warna background widget tu

3. tekan save... done!! :)

kredit by gary
TERIMA KASIH SUDI BACA DAN KOMEN

1 comment:

bloggerid said...

manfaat buat saya nih