When it comes to center aligning an icon, I typically use margin: auto;
, text-align: center;
, or
left: 50%; transform: translateX(-50%);
. However, I've run into a hurdle trying to center align three icons together. I thought applying these techniques to a wrapping div would do the trick, but it hasn't worked as expected. I want all three icons to be in the same row like this:
https://i.sstatic.net/HZtLR.png
<div class="socialWrap">
<a href="/content/campaigns/we-retail" target="_blank"><i class="fa fa-facebook-square"></i></a>
<a href="/content/campaigns/we-retail" target="_blank"><i class="fa fa-twitter-square"></i></a>
<a href="/content/campaigns/we-retail" target="_blank"><i class="fa fa-youtube"></i></a>
</div>