'How to align icon next to text of link attribute with tailwind-css and css.gg

This is 100% a duplicated but I cannot get the icon left to the text of the <a>-attribute.

The closest I got is with this solution:

<script src="https://cdn.tailwindcss.com"></script>
<link href='https://css.gg/mail.css' rel='stylesheet'>

<a href="mailto:[email protected]"><i class="gg-mail float-left mr-1 top-1"></i>[email protected]</a>

why does this solution not work in my project? Is it because of the css.gg?

https://stackoverflow.com/a/27969559/3832357



Solution 1:[1]

Nevermind I solved it with flex! But any other solutions would be appreciated!

<script src="https://cdn.tailwindcss.com"></script>
<link href='https://css.gg/mail.css' rel='stylesheet'>

<a class="flex items-center" href="mailto:[email protected]"><i class="gg-mail mr-1"></i>[email protected]</a>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tim4497