Welcome Guest, Not a member yet? Register   Sign In
safe_mailto with FontAwesome icon
#5

(10-16-2015, 09:02 AM)mwhitney Wrote: Try using this CSS (after the font-awesome.css is included on your site):


Code:
a[href^="mailto"] {
   display: inline-block;
   font: normal normal normal 14px/1 FontAwesome;
   font-size: inherit;
   text-rendering: auto;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
}
a[href^="mailto"]:before {
   content: "\f0e0";
}

This is basically the .fa and .fa-envelope CSS from font-awesome applied to mailto links.

(10-16-2015, 09:52 AM)mwhitney Wrote: You'll probably just need to move everything into the :before selector.

Yup that did it.  I needed to also add a right margin to separate the icon from the email link, but moving them into the :before selector worked.  Thank you!
Reply


Messages In This Thread
safe_mailto with FontAwesome icon - by alotufo - 10-16-2015, 07:09 AM
RE: safe_mailto with FontAwesome icon - by alotufo - 10-16-2015, 10:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB