Linking to an external CSS (cascading style sheets)

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered
How do I link to an external CSS? I'm posting with Firefox 29.0.1 (Mac) and the HTML coding link to my external CSS (<link href="http://esd.mit.edu/digest/digest.css"; rel="stylesheet" type="text/css">) won't "stick" and keeps reverting back to "<link rel="stylesheet" type="text/css">" -- I would really like to use this style sheet if at all possible. Is there a trick to  doing this?

Photo of MIT Engineering Systems Division

MIT Engineering Systems Division

  • 5 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 0
  • 1
Photo of Katie Watts

Katie Watts, Support Team Manager

  • 423 Posts
  • 66 Reply Likes
Hi there, MIT!

When you're coding your own HTML, you'll actually want to code all of your styles inline rather than using a style sheet. Some email inboxes/devices strip off style sheets, so inline CSS is the most rock solid way to style for email -- and always the route we'd recommend you go. Our online help goes further into inline CSS here.

I took a quick peek at the HTML saved in your account, and there are a few other things that aren't inline with our guidelines for coding your HTML for an email environment. We've put together some tips, tricks and requirements to help you refine your code, and following them helps ensure your HTML will solidly render in the wide variety of email clients out there when sent through the Emma application. You can find those guidelines in the "HTML Help" section on this page.

Beyond coding your styles inline, the other specific things I see that you may want to tweak to ensure your email renders reliably are as follows:
  1. Don't use <body>, <head>, <meta>, <title>, <html> or Doctype tags in your HTML. You're going to paste your code into a template that already contains all the necessary body and HTML formatting tags. (read more)
  2. Use nested tables instead of using colspans or rowspans -- as some email clients don't know how to render them properly so your content can become skewed and link tracking can be negatively affected. (read more)
  3. Avoid using image maps as they are not always reliable in an email environment. Instead, wrap your image in a link tag. Adding what I like to call "image glue" -- border="0" and style="display:block;" -- inside your image tag will ensure it doesn't render with a link-blue border. If an image needs to link to more than one URL, you'll want to slice that image into separate pieces so you can hard link each slice. (read more)
Hope this helps! If I can provide further clarification on coding your own HTML email, please give me a shout on this thread. Happy Friday!
Photo of MIT Engineering Systems Division

MIT Engineering Systems Division

  • 5 Posts
  • 0 Reply Likes
Ok. I have made a bunch of edits to the coding and now my issues are down to two.
1. The line spacing isn't working
2. The link formatting isn't working

Any suggestions.  This is the page for you to check out: https://app.e2ma.net/app2/campaigns/create/207465134/

Thanks!