How to craft a modern, mobile-optimized HTML email template. Jason Samuels, NCFR IT Manager DrupalCamp Twin Cities May 2012



Similar documents
Responsive HTML and Drupal

HTML TIPS FOR DESIGNING

MCH Strategic Data Best Practices Review

GUIDE TO CODE KILLER RESPONSIVE S

Introduction to Adobe Dreamweaver CC

8 STEPS TO CODE KILLER RESPONSIVE S

RESPONSIVE DESIGN FOR MOBILE RENDERING

The Essential Guide to HTML Design

Essential HTML & CSS for WordPress. Mark Raymond Luminys, Inc mraymond@luminys.com

CST 150 Web Design I CSS Review - In-Class Lab

Magento Responsive Theme Design

Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

Designing HTML s for Use in the Advanced Editor

Creative Guidelines for s

Web Design I. Spring 2009 Kevin Cole Gallaudet University

A quick guide to... Effective HTML Messages

Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates

Converting Prospects to Purchasers.

JJY s Joomla 1.5 Template Design Tutorial:

Base template development guide

Web Design with CSS and CSS3. Dr. Jan Stelovsky

Creating Effective HTML Campaigns

Responsive Design

Outline of CSS: Cascading Style Sheets

Campaign Guidelines and Best Practices

Colgate University Website Content Style Guide

HTML Power Tips. HTML messages improve your CTR. World s Easiest Marketing.

HTML CSS Basic Structure. HTML Structure [Source Code] CSS Structure [Cascading Styles] DIV or ID Tags and Classes. The BOX MODEL

RESPONSIVE DESIGN BY COMMUNIGATOR

Web layout guidelines for daughter sites of Scotland s Environment

Marketing Cloud Quick References Guide

Table of Contents. What is ProSite? What is Behance? How do ProSite & Behance work together? Get Started in 6 Easy Steps.

Creator Coding Guidelines Toolbox

The Essential Guide to HTML Design

Your Guide to the All New, Drag & Drop, Mobile-Responsive Builder

SAHARA DIGITAL8 RESPONSIVE MAGENTO THEME

Responsive Web Design: Media Types/Media Queries/Fluid Images

How To Create A Web Page On A Windows (For Free) With A Notepad) On A Macintosh (For A Freebie) Or Macintosh Web Browser (For Cheap) On Your Computer Or Macbook (

Designing HTML ers

CSS for Page Layout. Key Concepts

This document will describe how you can create your own, fully responsive. drag and drop template to use in the creator.

Microsoft Expression Web Quickstart Guide

Principles of Web Design 6 th Edition. Chapter 12 Responsive Web Design

Kentico CMS, 2011 Kentico Software. Contents. Mobile Development using Kentico CMS 6 2 Exploring the Mobile Environment 1

Create Your own Company s Design Theme

{color:blue; font-size: 12px;}

Basic tutorial for Dreamweaver CS5

Responsive Web Design for Teachers. Exercise: Building a Responsive Page with the Fluid Grid Layout Feature

How to Build a SharePoint Website

ORACLE WEB CONTENT MANAGEMENT SYSTEM 2010

Coding HTML Tips, Tricks and Best Practices

Development Perspective: DIV and CSS HTML layout. Web Design. Lesson 2. Development Perspective: DIV/CSS

customer community Getting started Visual Editor Guide!

Marketing Best Practices in a Mobile World. Ruth Presslaff President ruth@presslaff.com

Responsive Design Guide. The fundamentals of designing and building mobile optimized

Basics of HTML (some repetition) Cascading Style Sheets (some repetition) Web Design

How to Properly Compose HTML Code : 1

A GUIDE TO MOBILE

Table of Contents Desktop PC and Apple Mac applications Web and mobile device readers Find out more about NewZapp

Web Design and Databases WD: Class 7: HTML and CSS Part 3

Mobile Web Site Style Guide

The Da Vinci Coding: The Art of HTML

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Garfield Public Schools Fine & Practical Arts Curriculum Web Design

ICE: HTML, CSS, and Validation

Mobile Friendly Design

Responsive Web Design in Application Express

ITNP43: HTML Lecture 4

Magic Liquidizer Documentation

Eloqua What is this and why should I read it?

Web Building Blocks. Joseph Gilbert User Experience Web Developer University of Virginia Library

How to make sure you receive all s from the University of Edinburgh

MARKETING BEST PRACTICES GUIDE

HTML Fails: What No One Tells You About HTML

css href title software blog domain HTML div style address img h2 tag maintainingwebpages browser technology login network multimedia font-family

Creating Web Pages with Dreamweaver CS 6 and CSS

Web Design and Development ACS Chapter 9. Page Structure

Contents. Downloading the Data Files Centering Page Elements... 6

Web Portal User Guide. Version 6.0

How To Write An From An Ipad To An Address In India

Advanced Drupal Features and Techniques

HOW Interactive Design Conference 2013

Introduction. If you have any questions along the way, feel free to contact our support team at mailchimp.com/support. Now, let s get started.

AEGEE Podio Guidelines

MARKETING BEST PRACTICES.

Transcription:

How to craft a modern, mobile-optimized HTML email template Jason Samuels, NCFR IT Manager DrupalCamp Twin Cities May 2012

Our old email template Pros Simple Lightweight Worked as plain-text Rendered OK on mobile Cons Outdated look Lots of junk code = error characters Inconsistent with website 2

Our new email template Pros Simple Lightweight Works as plain-text More Pros! Preheader text Optimized for mobile (ios) Consistent with website Clean code Tested across email clients 3

How we got there Three major resources made this possible: MailChimp (free templates and guide) Cameron Lefevre (NTC session on optimizing email for mobile) Email on Acid (testing service) 4

MailChimp Free resources available at: http://mailchimp.com/resources/ Email Jitsu guide: http://mailchimp.com/resources/guides/ email-jitsu Free email templates: http://mailchimp.com/resources/htmlemail-templates 5

Theming the template Open your website s Style Guide page, start Firebug, and start matching elements Focus on: color font-family font-size font-weight line-height 6

Mobile optimization Cameron Lefevre is my hero NTEN blog post introducing the issue: http://www.nten.org/articles/2012/theage-of-mobile-email-has-arrived-are-youready NTC session notes (include code samples): http://labs.mrss.com/optimizing-email-formobile-phones-notes-from-ntc-2012/ 7

CSS3 @media query @media screen and (max-width: 600px) { table.emailtable, td.emailcontent { width: 95%!important; h1, h2, h3, h4 { text-align:center!important;.nomob { display: none!important;.headercontent{ text-align:center!important; a.baemailfooternav { display: block!important; font-size: 14px!important; font-weight: bold!important; padding: 6px 4px 8px 4px!important; line-height: 18px!important; background: #dddddd!important; border-radius: 5px!important; margin: 10px auto; width: 240px; text-align: center; By defining alternate styles in the CSS for devices based on their maximum screen width, some elements can be transformed or hidden to make for a more user-friendly format 8

CSS3 @media query @media screen and (max-width: 600px) { table.emailtable, td.emailcontent { width: 95%!important; h1, h2, h3, h4 { text-align:center!important;.nomob { display: none!important;.headercontent{ text-align:center!important; a.baemailfooternav { display: block!important; font-size: 14px!important; font-weight: bold!important; padding: 6px 4px 8px 4px!important; line-height: 18px!important; background: #dddddd!important; border-radius: 5px!important; margin: 10px auto; width: 240px; text-align: center; Defines when mobile styles get called This query applies format on screens up to 600px wide Main table gets re-sized from 600px down to 95% of the screen s width 9

CSS3 @media query @media screen and (max-width: 600px) { table.emailtable, td.emailcontent { width: 95%!important; h1, h2, h3, h4 { text-align:center!important;.nomob { display: none!important;.headercontent{ text-align:center!important; a.baemailfooternav { display: block!important; font-size: 14px!important; font-weight: bold!important; padding: 6px 4px 8px 4px!important; line-height: 18px!important; background: #dddddd!important; border-radius: 5px!important; margin: 10px auto; width: 240px; text-align: center; Header tags and header content get centered when viewed on mobile nomob is used to hide elements on mobile 10

CSS3 @media query @media screen and (max-width: 600px) { table.emailtable, td.emailcontent { width: 95%!important; h1, h2, h3, h4 { text-align:center!important;.nomob { display: none!important;.headercontent{ text-align:center!important; a.baemailfooternav { display: block!important; font-size: 14px!important; font-weight: bold!important; padding: 6px 4px 8px 4px!important; line-height: 18px!important; background: #dddddd!important; border-radius: 5px!important; margin: 10px auto; width: 240px; text-align: center; Transforms styling in the footer navigation when viewed on mobile. In particular, this code takes ordinary text links and turns them into easy-to-press buttons. 11

@media query example Mobile transformation <a href="http://www.twitter.com/ncfr" class="baemailfooternav">follow on Twitter</a><span class="nomob"> </span><a href="http://www.facebook.com/ncfrpage" class="baemailfooternav">friend on Facebook</a><span class="nomob"> </span><a href="-" class="baemailfooternav">forward to a friend</a> 12

Email on Acid Cross-client email testing service Shows how your message displays in 45 combinations of email services, browsers, and clients Plus code analysis and spam filter testing $35/month for unlimited testing Discounted for longer term commitments $2 - $5 per test a la carte pricing available 13

Email on Acid 14

Don t use bullet points (or numbered lists) Some webmail clients left justify them Some webmail clients center them Some left-justify lists & center the content Path of least resistance = ditch the <ol> tag, go w/ asterisks & line breaks instead 15

<p align= left > GMail and Yahoo Mail default paragraph (<p>) tags to align center align when viewed in Internet Explorer Other browsers still align paragraphs left Why? I don t know. Forcing the alignment left fixes it 16

Preheader table needed a background color Although it s already defined in the CSS, Yahoo Mail doesn t show it With the repeating blue stripe at the top of our template, that resulted in dark text on a dark background 17

Voila! This was not a short process Took a lot of work and dozens of tests to get it right End result looks pretty darn good though, and stays looking good across all of the popular email clients 18

Additional resources http://emailonacid.com/blog http://campaignmonitor.com/blog http://blog.jasonsamuels.net 19