I recently began using FontAwesome and it's been going well. However, I have a question about using it with an anchor tag that has text-decoration:none
, and on hover text-decoration:underline
. Whenever I hover over the link, the icon also receives the underline effect... is there a way to only underline the link and not the icon?
I attempted placing the icon outside of the anchor tag, but then it didn't get the color I had assigned to the link.
Here is a snippet of the code:
<style>
a{color:red;text-decoration:none;}
a:hover{text-decoration:underline;}
</style>
<a href="#"><span class="fa fa-camera-retro"> </span>This is a test</a>
Thank you for your help!