I'm trying to apply a style to but when I try to apply style directly to the class ".fa {}", it looks different than when I apply it to the "#contact a {}"
/*
.fa {
padding: 40px;
font-size: 30px;
width: 30px;
text-align: center;
text-decoration: none;
margin: 15px;
border-radius: 50%;
}
*/
#contact>a {
padding: 40px;
font-size: 30px;
width: 30px;
text-align: center;
text-decoration: none;
margin: 15px;
border-radius: 50%;
}
.fa:hover {
opacity: 0.7;
}
.fa-facebook {
background: #3B5998;
color: white;
}
.fa-twitter {
background: #55ACEE;
color: white;
}
.fa-google {
background: #dd4b39;
color: white;
}
.fa-linkedin {
background: #007bb5;
color: white;
}
.fa-youtube {
background: #bb0000;
color: white;
}
.fa-instagram {
background: #125688;
color: white;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<section id="contact">
<a href="#" class="fa fa-facebook"></a>
<a href="#" class="fa fa-twitter"></a>
<a href="#" class="fa fa-google"></a>
<a href="#" class="fa fa-linkedin"></a>
<a href="#" class="fa fa-youtube"></a>
<a href="#" class="fa fa-instagram"></a>
</section>