I am facing challenges while trying to customize the background behind my font-awesome icons. My goal is to create a white background that does not extend beyond the actual icon itself.
Currently, the result looks like the image below:
https://i.sstatic.net/sVAMs.png
As shown in the image, the white background is taking up too much space around the icon.
Code
<div class="footer-icons">
<a href="#"><i class="fa fa-pencil-square fa-3x pen-btn"></i></a>
</div>
Css
.footer-icons a {
padding-right: 10px;
color: green;
}
.footer-icons i {
background-color: white;
border-radius: 5px;
padding-left: 3px;
padding-right: 3px;
}
I have attempted to adjust the padding values to make the background smaller and contained within the green icon.
Removing the padding altogether results in the following appearance:
https://i.sstatic.net/FGolG.png
I hope someone can point out what I might be doing incorrectly.