Skip to content

Instantly share code, notes, and snippets.

@BenFausch
Created June 27, 2018 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenFausch/19a9c55b721f53bde782c4f7f41ce704 to your computer and use it in GitHub Desktop.
Save BenFausch/19a9c55b721f53bde782c4f7f41ce704 to your computer and use it in GitHub Desktop.
Notes for dealing with emails
GENERAL:
- every element must be in a html tag with inline styles
- complex/responsive designs will break
- tables are best as they are supported and handle fluid layout across almost all email clients
- images and containers require html style attrs align="", width="", and height="" to keep design
- use padding instead of margin as some clients ignore margins
Outlook 2007/2013
html tags override sizes, i.e. if you want a 48px <h6> it won't work, so use tags for sizing
user's security settings will define whether or not images load
<br> is ignored
Gmail
!important must be added to tags, and <style> containers are removed
IOS
various IOS will resize emails, use meta tags to prevent this
<meta content="width=device-width" name="viewport"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment