Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to eliminate envelope icon when using mailto href link?

I’m trying to develop a very simple static webpage for my personal website, but have been stuck on a mysterious envelope icon that appears when using mailto and the a href tag (shown to the left of the "@" symbol):

I have opened the webpage on multiple browsers and it shows up on all of them. Does anyone know if it is part of the drop in CSS sheet I am using, and if so how to remove it? Thanks!

Here is the whole HTML code on Pastebin and here is the mailto line:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

<a href="mailto:me@example.com" target="_blank" rel="noopener noreferrer"><span class="myicon fa-solid fa-at"></span></a>

>Solution :

The envelope icon is part of the CSS stylesheet (light.css) that you are using as seen in this screenshot:

css screenshot

The fix is very simple, we can override the style being set like so:

a[href^="mailto:"]::before {
    content: '';
}

This will remove the envelope icon from all the links where the href starts with "mailto:"

Alternately, if you want to remove the mail icon from just this link,

You can set a class to the link tag, for e.g.: my-class, like so:

<a href="mailto:me@example.com" class="my-class" ...>...</a>

Then in your style tag need to add another rule like so:

...

.my-class::before {
    content: '' !important;
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading