How to Create: Social Media Buttons
- Previous Page Button on Image
- Next Page Read More/Read Less
Learn how to use CSS to set the styles of social media buttons.
How to Design Social Media Button Styles
Step 1 - Add HTML:
<!-- Add icon library --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <!-- Add Font Awesome icons --> <a href="#" class="fa fa-facebook"></a> <a href="#" class="fa fa-twitter"></a> ...
Step 2 - Add CSS:
Rectangle Example
/* Set styles for all Font Awesome icons */ .fa { padding: 20px; font-size: 30px; width: 50px; text-align: center; text-decoration: none; } /* Add hover effect if needed */ .fa:hover { opacity: 0.7; } /* Set specific colors for each brand */ /* Facebook */ .fa-facebook { background: #3B5998; color: white; } /* Twitter */ .fa-twitter { background: #55ACEE; color: white; }
Rounded Corner Button
Tip:add border-radius:50%
to create a circular button, and reduce width
:
Rounded Corner Example
.fa { padding: 20px; font-size: 30px; width: 30px; text-align: center; text-decoration: none; border-radius: 50%; }
Related Buttons
Tutorial:Icon
Tutorial:CSS Button
- Previous Page Button on Image
- Next Page Read More/Read Less