Our website is built using Bootstrap v4.6.2 and FontAwesome 5.15.4. The following HTML code snippet displays an unordered list with FontAwesome icons of different sizes (0.8em
vs 0.44em
).
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9efcf1f1eaedeaecffeedeaab0a8b0ac">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet"/>
<ul class="fa-ul">
<li>
<i class="fa-li fa fa-star fa-sm" style="font-size: 0.8em;"></i>
<a href="#">Link 1</a>
</li>
<li>
<i class="fa-li fas fa-circle fa-sm" style="font-size: 0.44em;"></i>
<a href="#">Link 2</a>
</li>
</ul>
The icons next to the links are not aligned properly. The circle icon is positioned further to the right compared to the star icon. Additionally, the icons should be vertically aligned with the text (currently, the circle icon is misaligned). How can we adjust the alignments to meet our requirements?