How To Add Social Media Icons to Blogger Header

social media icons, facebook icons, social media icons for bloggerThis tutorial will help you to add social media icons in the top right corner of the page which could increases the likelihood that readers can follow through the various social networks. There are several ways to do this, like adding a new widget section to the blog header but now, we'll do it using an unordered list that uses icons of Facebook, Twitter, Google+ and blog feed, and as a bonus, the icons will rotate when you hover over them.

You can see a demo in this test blog.


Adding Social Media Icons to Blogger Header

Step 1. From your Blogger dashboard, go to Template and click on the Edit HTML button:

blogger blogspot, blogger template, blogger gadgets

Step 2. To expand the style, click on the small arrow on the left of <b:skin>...</b:skin> (screenshot 1), then click anywhere inside the code area to search (using CTRL + F) for the ]]></b:skin> tag (screenshot 2) and add this code just above it:

 /* Social icons for Blogger
----------------------------------------------- */

#social-icons {
margin-bottom:-30px;
height:50px;
width:100%;
clear:both;
z-index: 2;
position: relative;
}
.social-media-icons {
display:table
}
.social-media-icons ul {
text-align:right;
padding:5px 5px 0 0
list-style-image:none;
list-style-position:outside;
list-style-type:none;
}
.social-media-icons ul {
margin-bottom:0;
padding:0;
float:right;
}
.social-media-icons li.media_icon {
margin-left:6px;
padding-left:0 !important;
background:none !important;
display:inline;
float:left;
}
.social-media-icons li:hover {
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(-360deg);
-moz-transition: all 0.5s ease-in-out;
-webkit-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}

Screenshot 1:


Screenshot 2:


Step 3. Now search for this line

<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>

Step 4. And just above it, add this code:

<div class='social-media-icons' id='social-icons'>
<ul>

<li class='media_icon'><a href='https://facebook.com/username'><img border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMjGl6LfV62BlNbdyGBFhcdfHPhhrkIe-EuYMSm0cpbYWigduFfRIFdWuZMk6Lx6_I4YrjNC5JfXB4Kcmvo1gU6yc4yviWRhoCzmX75bdtHCn48DPWSF1T9JGHi1-S0N0nokCALZqtZJ0/s1600/Facebook.png'/></a></li>

<li class='media_icon'><a href='https://twitter.com/#!/username'><img border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW3NmGdytyPyrCLIZDxCzV_QgIMQCkHoR5y_iYnL7UefL0lQeIJSX6U90EKMDJmRR_plQVhvo-nA078DLtZYbyMzTRKXjoPn8f53xMNoWcorISDBaoplhS8AtfmwLNyB21f0oDNhXePVI/s1600/Twitter.png'/></a></li>

<li class='media_icon'><a href='https://plus.google.com/XXXXXXXXXXXXXXXXXX/about'><img border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWZr3R2vW71FWWyLj0ZbOPjYN2-JD7CL4GTk_zZeoBX8IbTevXSaXLfPPwNU2slxzjVUUMZHTLiHvZJS5wX9l2B9Mf7j6IlzhssWMwNOaUdJfOIo_3EI6iZ3xJ4zU5BRgJmJakOD4Art0/s1600/googleplus.png'/></a></li>

<li class='media_icon'><a href='http://name-of-your-blog.com/feeds/posts/default'><img border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY1oYUGBnuo5Ax1ngrZMQrYlO2bxmy44RkXJnYBPOdHpBW1V63KYvAT-_0-wBBzolcXR_Uvf7jsaYMpqUwqb62s_fZ0vQFBqfCu0d1jTv09D1AbfyTvB9dfs1_DSnV4tp29_PbatNI828/s1600/RSS.png'/></a></li>

</ul></div>

Customization

- Change what's in red with your usernames and id: the first is your Facebook username, the second is that of Twitter, in the third you should change the X by the ID of your Google+ profile and in the fourth you will put the name of your blog.
- To change the icons, just replace the urls in blue with the ones of your images.
- You can add more icons if you want, you just have to add before </ul></div> a line like this for each extra icon you want:

<li class='media_icon'><a href='Link URL'><img border='0' src='Image URL'/></a></li>

Step 5. Finally, Save the Template to apply the changes.
The effect is done with CSS3, so this effect will not work in older browsers.

Comments/disqusion
103 comments

  1. says:

    thank you for sharing how to set up a social icon in the header blogger.
    And not only serves it easier for visitors to share content, but also as a tool to beautify blog.

  2. says:

    Great post, Indeed. I will try this code in my blogs to get better blog website design. Thanks a ton for sharing this wonderful information with us.

  3. says:

    Hi Natasha,
    Sorry but I don't see them anywhere on your blog.
    Could you make a screenshot?

  4. says:

    It actually work honestly thanks alot

  5. says:

    thank you for this blog!.. it really helps me cause im new in the bloging world
    here 's what i've done http://easydomainfree.blogspot.com/

  6. says:

    how can we put this social media buttons in front of the header having an image without any "damage made" on it?

  7. says:

    Thanks so much for this tutorial. You make my blog a better looking blog :)
    www.septimes.com

  8. says:

    This worked great except it scooted my blog title down. How can I fix it? I have a pre-made template but can edit the html. Thanks!!

  9. says:

    You have to reduce the margin-bottom value (-30px) that is just below #social-icons {
    Thanks for visiting!

  10. says:

    work perfectly, but i got problem because i use responsive template from Flat UI
    do you have tutorial about add social media button on sidebar/ use widget?

  11. says:

    amazing! I used this on my site

    http://collegemarketing101.blogspot.com/

  12. says:

    Great post - I have a handful of blogger blogs I should neaten up and add social icons too if only to increase their social sharing a little. Love what you've done with your blog. :)

  13. says:

    It worked! But the icons are located before my blog header, so now the last part of my blog title is missing. Do you know how to fix this?
    Naomi, x

  14. says:

    Thank you for sharing. Worked perfectly.

  15. says:

    Thanks, work perfectly.

  16. says:

    Hi, thanks for this. I'm wondering how to actually change the position of the icons please?

  17. says:

    These are good tips in here!

  18. says:

    Thanks for sharing, helped me so much! I got a question: could you do a tutorial on designing those buttons in photoshop? I'd like to make one for instagram and pinterest and so on, but I don't know how ... :)

  19. says:

    Yes this was a great tutorial and I was able to follow it directly, but I actually would prefer the icons in my sidebar, not in my header, because it cut off my header image. Thanks, though!

  20. says:

    thanks for information...
    its worked

  21. says:

    how to open these in a different tab ?

  22. says:

    I tried errors appearing....i have a template from deluxetemplate.net..how can i use your explanation..i seriosly want the icons..

  23. says:

    Hello admin,
    Thanks for this valuable post. Nice code for me. But i am in vain.

    Best Regagards,
    ataur

  24. says:

    great tuts, i'll just take this one... thanks for clear share.

  25. says:

    I'm keen to know too! Thank you for the post by the way, and thank you for making it so easy to follow!

  26. says:

    Thank a lot for the post. Can you please add a pinterest button and subscribe to email button in this?

  27. says:

    Sure it worked. But i had problem with the last button....see my site

    http://tainersposts.blogspot.com/

    The last button does not show anything..... it just says page cannot be found...

  28. says:

    My blog's HTML doesn't have ANY of the code we're supposed to find....what?

  29. says:

    Thanks worked well

  30. says:

    This was so helpful.

    Thanks a ton!

  31. says:

    This works great. I spent so much time looking how to do this and cam accross your post by accident. I tried to add pinterest button but I don't have image source code. Would you happen to have that?

  32. says:

    I keep getting a "400 Error" when I try to do this. What am I doing wrong? Help!

  33. says:

    in my blog, the buttons get pasted on left side and put down title right below them, what should i do for this? help

  34. says:

    Hey I hope that you can help me. Here's the link to my blog : www.tabeamw.blogspot.com

    You can see that the right side of my header is away because of the icons.

    Can you help me? Thanks :-)

  35. says:

    This is nice post. Please help me add addthis social button in my blog. Thanks for your help.

  36. says:

    Thanks for the tutorial I will apply at my blog.

  37. says:

    Thank you so much! This is perfect and easy to follow! I have shared it for others because you totally deserve it!

  38. says:

    this is an awesome tip I was looking for long time. I am sporting the icons now in my blog. thanks to you

  39. says:

    Hi this didn't look right for me and even when I deleted all the code the icons are still there. How do I remove them? http://bitnbookpromoters.blogspot.co.uk/

  40. says:

    hi admin, this is a great tutorial, I want to ask how can I group my icons in to three, its eating up the space in my header, thanks a lot

  41. says:

    It works thanks, but my rss feed does not work

    http://zakson-tech.blogspot.com/

  42. says:

    when i tried this on my blog, the four icons worked perfectly but they were not displayed over the header image instead my header image got resized and the icons were displayed on the right side horizontally please help me to place the icons on the top right end of the header image..
    my blog address is :
    http://easysubtitles.blogspot.in/

  43. says:

    I've tried 3 times to add this code, but it won't save to my blog.

  44. says:

    thanks a lot..finally i got it from you..its awesome..and its working now perfect thanks

  45. says:

    Thanks!

  46. says:

    yey! Thanks! :)

  47. says:

    Thanks gan udah nge share

  48. says:

    That's amazing! Thanks so much.

    Is there a way to add an instagram button?

  49. says:

    How can I put them over the banner I have on my header. Thanks.

  50. says:

    Great article, helped me a lot!
    One thing though: I'd like to change the icons into black and white ones and I've been trying to change the urls with the ones of my chosen images, however it doesn't work. I'm able to replce them but then nothing shows on my blog. Which url should I use exactly?

    The linke to my blog is the following: http://lifeofahautecouturehooligan.blogspot.nl/
    Thanks in advance!

  51. says:

    Hi, there's no way to do it?

  52. says:

    Did you click on the Save template button after replacing the URLs? And please make sure that you don't remove any quote and replace only the address in blue. Thanks for stopping by!

  53. says:

    If you want to move them further from the top, change the -30px; value from margin-bottom:-30px; (#social-icons). To move more on the left, add below #social-icons { this line:
    margin-left: -50px;

    Then change -50px with a bigger/smaller value.
    Sorry for replying so late.. I hope this will help you!

  54. says:

    Thank for this! It's really cool. I just have a problem with adding new icons because some of the icons I tried use are too large so I ended up getting a massive icon. How do I make it smaller?

    Thanks :)

  55. says:

    Hi Lauren,

    Please add this code above ]]></b:skin>

    .media_icon img{
    width: 30px;
    height: 30px;
    }

    And change 30px if you want to make your icons bigger/smaller, then Save your Template.
    I hope this will work for you. Thanks for visiting!

  56. says:

    Hi, I posted my icons and they ended up being placed vertically on top of the header (with the header posted after and beneath it) any fix? Thank you!

  57. says:

    Hi Jay,

    Add the codes in bold to this part:

    #social-icons {
    margin-bottom:-30px;
    height:50px;
    width:100%;
    clear:both;
    z-index: 2;
    position: relative;
    display: inline-block;
    float: left;

    }

  58. says:

    Thanks so much for this - easy to follow. I feel empowered!

  59. says:

    This was so useful. I am trying to add the instagram logo in my header but am struggling to find a matching size and shape to the ones already given by you. Do you happen to have a link to a matching instagram logo?

  60. says:

    Oh it make my Blog very nice http://caomode.blogspot.com/
    thank you ;)

  61. says:

    Thanks for the tips - worked for me. Do you know how to customise the text that appears when you share via Twitter so that it gives a personal twitter handle and not ' via @Helplogger' ?
    Thanks!

  62. says:

    Thank You!

  63. says:

    Thanks dear...very useful article :)

  64. says:

    THHHHHAAAANKKK UUUUU

  65. says:

    how to add youtube ?

  66. says:

    Thank you so much! Your instructions are clear and easy to follow!

  67. says:

    thank you for this wonderful tutorial but how do I adjust the header size, please look in my blog I want the icons above the header, can you please help how to do it. here is the link of my blog. many thanks http://myyellowbells.blogspot.ae/

  68. says:

    Hi,

    Thanks for sharing your exertise.

    I don't have
    in my blog. Can you help, please?

    Thank you.

  69. says:

    Questions will using this code on a dynamic view template work?

  70. says:

    Sorry but as far as I know, Dynamic Views templates don't support gadgets or custom HTML/CSS.

  71. says:

    Thank you for post. I need this :)

  72. says:

    Hello, Whatever I do I can't get the icons placed horizontally and animate in my horizontal menubar or anywhere in the header of my blog http://lastingrose.blogspot.co.uk/
    The html specifies a class .media_icon which is not in the css and which is taking up the full width of the division making the icons stack up rather than place horizontally even when display: inline-block; and
    float: left; are specified for the parent division. Could you give us a css suitable for horizontal placement and animation?
    Many thanks for this nice work.

  73. says:

    Thanks for taking note of my comment. I sort of managed to get the icons on to my CSS menu bar after removing the DIV and UL tags and placing the li tags below others in the bar. I had to delete a couple of existing menu items to make some space for the buttons as they inherit a width of 88px and won't get any closer. Also the animation doesn't work . I suppose there is a way to include the css in those of the menu bar to get everything working. My template is Metro Minimalist . I would appreciate your help.

  74. says:

    Hi Sreedhar,

    For the animation on hover, try to substitute .social-media-icons li:hover with li.media_icon a:hover as you removed the div which has the social-media-icons class assigned. Regarding the icon placement, I will need to see them there in order to figure out what you need to change. I would recommend you to add the entire code because once you remove the div and ul tags, the style of the menu elements will override the style of the social media icons and this will only complicate things. Sorry for the late reply.

  75. says:

    Hey.. I did this and they are listed vertically but I want them horizontal. Please help!!!

  76. says:

    Worked like a charm! Thanks!

  77. says:

    Very helpful. Thanks for this.

  78. says:

    Hello,

    thank you for the great tutorial, it was very helpful! I was just wondering how you would go about making each link open up in a new tab or window? Just in case you want readers to stay on the page they are on still be able to visit your social posts.

    But I was able to add it to my site regardless, and it looks great!
    http://spritendeb.blogspot.com/

  79. says:

    Hi Sprite,

    You will need to add the target="_blank" attribute to your links (step 4) - for example: <a href='url-here' target="_blank">

    Thanks for visiting!

  80. says:

    This post is fabulous - useful and helpful. I've added 3 of your sm icons plus insta to my blog. I couldn't find an insta icon that matched the size of yours, so I just changed you icons size using the icons from the insta page I had found.
    I love how they rotate and being able to open them in a separate window is perfect.
    The only question I have is about the mobile view. When I open my blog on my phone, my header and the icons are on top of each other. Is there some 'outside the square' solution to this I haven't been able to work out?

    Thanks

  81. says:

    Thanks for this article. My blog look like a pro now.:D

  82. says:

    Don't why it comes on left side for me.
    www.peaceguidance.blogspot.com

  83. says:

    Not sure what blue URL you are talking about to change the icons?

  84. says:

    How do you get image url for instagram and instead of opening in the same page how do you get it to open in a new link?

  85. says:

    How did you get the insta icon?

  86. says:

    Can I add social media icons without having a social media site. I want to add those icons, so others can share it. How would I proceed in step 4?

  87. says:

    tks a lot i did it

  88. says:

    Admin:
    I added the 'social media' icons, it was fine.
    Then I added the floating bar and removed it after a day.

    After that the header social media icons are left aligned. Please help

  89. says:

    Thks I've managed to get the icons on my blog but the icons are on the left hand side and go down - how do I get them on the right and horizontal? Plus can you give me the Pinterest script? Sorry not very computer savvy

  90. says:

    Hi Karen,

    Go to Template and press the Customize button > navigate to Advanced > Add CSS and add this code inside the box:
    li.media_icon {display: inline-block; float: right;}

    Hit the 'Apply to Blog' button to save the changes. To add the Pinterest button, go again to Template > Edit HTML and add this line just above the </ul></div> tags (see step 3 and 4):

    <li class='media_icon'><a href='http://name-of-your-blog.com/feeds/posts/default'><img border='0' height="36" width="36" src='http://4.bp.blogspot.com/-Xd5UE2Ozb8U/U_j46P_3VeI/AAAAAAAAKOw/3z5Ju_NQU2o/s1600/pinit-button.png'/></a></li>

    And hit the 'Save template' button.

  91. says:

    Hi Ruchi,

    Go to Template, hit the Customize button and navigate to Advanced > Add CSS. Paste this code inside the box and hit the 'Apply to blog' button:
    .social-media-icons {position: absolute; right: 0; z-index: 100;}

    Hope it works.

  92. says:

    Sorry it is still not working. The whole of step 2 is in the CSS box and I've tried it with the new
    code at the bottom and at the top. I've even deleted step 2 from the box altogether but nothing seems to work? Plus the icons also have a black dot to the left side.
    Here's my blog just in case it is easier to see it http://frumpytofunky.blogspot.com
    Thks for the Pinterest button - have added successfully
    Karen

  93. says:

    Hi Karen,

    I'm not sure if this is the problem, but it appears that there's a missing bracket in the CSS code. Try to find this part in the HTML of the template (click anywhere inside the code area and press the CTRL + F keys):
    #header-inner img

    just below you should see this line
    margin: auto;

    if there's no curly bracket after it, add it like this:
    #header-inner img {
    margin: auto; }

    And Save your template. If it still doesn't work, please send me a copy of your template at heplogger76@gmail.com

  94. says:

    Thanks a lot! It works!

  95. says:

    Hi Admin , have emailed you and attached my template. The icons have now moved to the right Yay!! but no longer work i.e. don't link to my social medias. It looks pretty though :) Thanks for all your help and I hope you can solve the problem. K

  96. says:

    Hello admin, Thanks for great tutorial. I've tried it. The link worked well, but the position it's kinda messed up and the code appear on my blog. I don't know how to solve it, hope you can help me out. this is the link to my blog, http://amyzackxx.blogspot.com/

  97. says:

    It's kinda okay now..I have to skip step 2..and it seems okay on my blog. thanks again for great tutorial.

  98. says:

    Hello, how did you add new social icon on your blog? Thanks.

  99. says:

    how to change location buttons

  100. says:

    Great tutorial, but unfortunately my header is an image and I could not figure out (my lack of HTML skills) how to set the icons horizontally to the upper right side of the page.They were lining up vertically on the left side.

    My work around was to add an HTML/Javascript gadget dump the code in and replace links with my own icons (linked via dropbox). Unfortunately, even that has it's own issue, a bullet point is showing up in front of the icon..... How to resolve this, I have no idea. On to the next project, unless someone has some insight to assist me, which would be greatly appreciated.

  101. says:

    Well, I saw Karen's post from 8/23 and decided to give it a try.

    I deleted the 'gadget' and added the HTML, then went to customize and added the CSS code. It placed it perfectly and got rid of the dot/bullet, but none of the icons are 'hot', they're all just images now. Argh, so close!

    Back to the gadget.

  102. says:

    Well well well, I guess I'm tired or maybe it's the beer(s), but they reason the icons aren't linking was b/c I was in PREVIEW mode! But now I've decided to keep them as a gadget b/c of how they look on a mobile device/smart phone when being located up at the top.

    Wow, a learning experience. But thank you for this article, very helpful.

  103. says:

    this code is not in my html

    any help?