I've been working with Bootstrap to design social buttons for Facebook and LinkedIn. However, I'm facing an issue where setting the background color to white for the buttons doesn't cover them properly. The white background extends beyond the social buttons, creating a visual inconsistency. You can see how it looks here: https://i.sstatic.net/zqMcV.png
The reason I set the background to white is to prevent the letters from blending in with the grey background if left untouched.
Here's the CSS code I have implemented:
.social a {
font-size: 4.5em;
padding: 1rem;
}
.fa-facebook {
background-color: white;
color: #3b5998;
}
.fa-linkedin {
background-color: white;
color: #0e76a8;
}
.fa-facebook:hover, .fa-linkedin:hover {
color: #d5d5d5;
}
And this is the corresponding HTML code:
<div class="container-fluid padding">
<div style="padding: 0px; margin: 0px;" class="row text-center padding">
<div style="padding: 0px; margin: 0px;" class="col-12 social">
<a href="https://www.facebook.com/westernUBT/"><i class="fab fa-facebook"></i></a>
<a href="https://www.linkedin.com/company/western-hasp/"><i class="fab fa-linkedin"></i></a>
</div>
</div>
</div>
Additionally, there seems to be a problem with detecting hover events on the social media icons. When hovering close to the gray area around the icons, the click event is triggered but I'm unsure why this is happening.