Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Font Awesome icons in Mailchimp campaign

I have created an HTML template for a mailchimp campaign that includes font awesome icons in the footer. If I send the HTML email using Mandrill, its works fine. When I import the HTML into a Mailchimp template, the icons dont appear.

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width" />
    <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    <link href='http://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
    <style>
.footer i {
        color: #999;
        margin: 0 2px;
    }

    .footer i:hover {
        color: #333;
    }

    .footer p {
        text-align: center;
        margin-bottom: 15px;
    }

    .footer a i {
        border: none;
        outline: none;
    }
</style>

Here are the icons in use:

<p>
  <a href="http://facebook.com/"><i class="fa fa-facebook-square fa-2x"></i>
  <a href="http://twitter.com/"><i class="fa fa-twitter fa-2x"></i>
  <a href="http://pinterest.com/"><i class="fa fa-pinterest fa-2x"></i>
  <a href="http://instagram.com/"><i class="fa fa-instagram fa-2x"></i>
</p>
like image 966
Karl Avatar asked Jun 17 '15 02:06

Karl


2 Answers

You need to use inline CSS as it says :

Use inline CSS Because browser-based email applications, such as Gmail, strip out <head> and <body> tags by default, always use inline CSS over embedded CSS.

Read the link

Try converting your code here and then mail it

like image 85
Ajay Narain Mathur Avatar answered Nov 19 '22 05:11

Ajay Narain Mathur


There's no way to do this. Unfortunately e-mail clients are way too limited. Most can't handle any CSS3, nor @font-face (that's what font-awesome uses for the icons). If you want Outlook support - you certainly want - you shouldn't use the icons as background images too.

The only safe way is to convert every icon to images. Fortunately, iconmoon can help. Choose the icons you need, select to download as SVG/PNG and use the PNG files.

Another warning: use tables for layout, like you were in 1998, no floats or fancy stuff like that.

like image 3
Elton Mesquita Avatar answered Nov 19 '22 05:11

Elton Mesquita