How to Create Social Media Buttons With CSS3 Gradients

A few months ago I wrote about how to add color buttons to your Genesis-powered website. I’d like to teach you how to create social media buttons using CSS3 gradients.

Below are the buttons that are included in this tutorial:

DribbbleFacebookGoogleLinkedInPinterestRSSTumblrTwitter

You might be asking yourself where you can use something like the social media buttons. You might implement these in the top right section of your header or in your sidebar.

Creating the Social Media Buttons

In your text editor, all you need to do is wrap the text in a div with a class applied to it. Here’s some sample HTML, along with the CSS required for the colored content boxes.

Email Newsletter

Like what you read here in this blog post?
Get more like it delivered to your inbox daily.

Comments

  1. says

    wow… that is power of CSS. This method for sure is better than usual image background technique as it does not involve load of image and ofcourse those extra http requests.

    I guess, we can make them more jazzy looking by adding logo on left side. Like, how about showing Twitter bird on button with “Twitter” text. What say?

  2. Greecom says

    Hi Brian
    Wery nice but in IE dont take the gradient so maybe you should add solid background for old IE something like
    a.button-dribbble {
    background:#ea4c89; /* old browsers */
    background:-moz-linear-gradient(top, #ea4c89 0%, #c93764 100%); /* firefox */
    background: -webkit-linear-gradient(top, #ea4c89, #c93764); /* webkit */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=’#ea4c89′, endColorstr=’#c93764 ‘,GradientType=0 ); /* ie */
    border: 1px solid #c93764;
    text-shadow: 0 -1px -1px #9d2849;
    }

    Not tested but I think should be something like that

  3. says

    Opened this tutorial first in IE 9 and was so disappointed with the buttons.
    Then opened in Chrome… what a difference.

    And the moral of the story is… move over to Chrome!

    Thanks for the tut and the code Brian.

  4. says

    Perfect timing- I have recently been looking into other alternatives for css buttons. Love that this is so lightweight and easy to implement.

    It’s like you read my mind!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>