Coding a Responsive HTML

Slides:



Advertisements
Similar presentations
Slice and Dice: From PSD Image to XHTML+CSS Svetlin Nakov Telerik Corporation
Advertisements

Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 3 – Web Design Tables & Page Layout
Web Page Design Using Tables Here you see three examples of how tables can be used to organize your content. We call this page layout or design. You can.
Cascading Style Sheets
Very quick intro HTML and CSS. Sample html A Web Title.
Part 5 Introduction to CSS. CSS Display - Block and Inline Elements A block element is an element that takes up the full width available, and has a line.
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
INTRODUCTORY Tutorial 7 Creating Liquid Layouts. XP Objectives Discern the differences among various types of layouts Create a liquid layout Create a.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
Unit 20 - Client Side Customisation of Web Pages
CSS Cascading Style Sheets Brief Introduction
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
Tutorial 6 Creating Fixed-Width Layouts
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 8 More on Links, Layout, and Mobile Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 12: Building Responsive Webpages.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
 jQuery Mobile An Introduction. What is jQuery Mobile  A framework built on top of jQuery, used for creating mobile web applications  Designed to make.
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
Bayu Priyambadha, S.Kom. for long documents, you can even have links to other locations in that same document  … where ident is a variable for identifying.
Chapter 8 More on Links, Layout, and Mobile Copyright © 2013 Terry Ann Morris, Ed.D revised by Bill Pegram, 9/24/
WDV 331 Dreamweaver Applications Designing Websites for Mobile Devices Dreamweaver CS6 Chapter 11.
CIS 1310 – HTML & CSS 7 More on Links, Layout & Mobile.
Page Layout & Mobile Web Using columns, grid systems, etc… to layout sites for desktops and mobile.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
INTRODUCTION TO HTML5 CSS Styles. Understanding Style Sheets  HTML5 enables you to define many different types of content on a web page, including headings,
Basic Responsive Design Techniques. Let’s take a look at this basic layout. It has a header and two columns of text, in a box that is centered on the.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
Week 8 – Part 3 More on Links, Layout, and Mobile Key Concepts 1.
Responsive design - Bedrock to our site Responsive site templates included.
 Word doc for you to download › Link at the beginning of class › 10 Questions › Answers to be added inline  Post to Sakai when completed › No resubmits.
 Remember that HTML is just text  Need to point to pictures  Use the img tag  alt: › screen reader › REQUIRED for this class and to validate.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
Layout with Styles Castro Chapter 11. Tables vs. CSS You can produce “liquid layouts” (layouts that stretch as the browser is resized) using tables or.
Updated on: September 4, 2010 CIS67 Foundations for Creating Web Pages Professor Al Fichera.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
GO MOBILE. GO RESPONSIVE. 185 mil mobile internet users in India
Positioning Objects with CSS and Tables
 Add one element at a time  If it doesn’t do what you want, › Delete it › DON’T just keep piling on more items.
| imodules.com It’s a Mobile World Out There, Shouldn’t Your be as Well? Presented by Chris Smith, Manager of Design Services.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Essential Questions What challenges do mobile devices present to Web designers? What are the basic concepts.
CSS (Cascading Style Sheets). CSS CSS – Cascading Style Sheets – Cascade because of the way CSS rules can stack on top of each other. Allows you to add.
CSS.
Web Development & Design Foundations with HTML5
CSCI 1720 W3.CSS – Part 1 East Tennessee State University Department of Computing CSCI 1720 Intermediate Web Design.
>> Navigation and Layouts in CSS
Concepts for fluid layout
Cao Yuewen SEEM4570 Tutorial 03: CSS Cao Yuewen
Advanced CSS BIS1523 – Lecture 20.
Web Development & Design Foundations with HTML5
CS3220 Web and Internet Programming Introduction to Bootstrap
Chapter 8 More on Links, Layout, and Mobile Key Concepts
IBM Kenexa BrassRing on Cloud Responsive Apply: Visual Branding Tool
Fixed Positioning.
Robert Kiffe Senior Customer Support Engineer
Basics of Web Design Chapter 8 More on Links, Layout, and Mobile Key Concepts Copyright © 2014 Terry Ann Morris, Ed.D.
SEEM4570 Tutorial 3: CSS + CSS3.0
Web Development & Design Foundations with HTML5
Concepts for fluid layout
Presentation transcript:

Coding a Responsive HTML Email Lydia Roberts Consultant/Web Designer HighRoad Solution

What is Responsive Design? An approach to web design that provides an optimal viewing experience across a wide range of devices. A responsive website or email has a layout that changes configuration based on what size screen it is viewed on.

The Goal Non-responsive Responsive

How Does it Work? HTML (content) and CSS (style) are the foundation of any website or email. A new version of CSS – CSS3 – gives us the @media query rule. It's what makes responsive design possible! Support for @media: Android 2.2+, iOS, BlackBerry 6+, Microsoft Windows Phone 7.5+ See full list »

Best Practices Single Column: Mobile max-width of ~300px Key Information and CTA at Top Keep Content Concise: Use teasers instead of lengthy articles. Eliminate table of contents and quick links where possible.

Best Practices 13px minimum font size Touch-friendly buttons Apple recommends minimum target area of 44x44px High Contrast Colors (i.e., dark text on a white background) Test, Test, Test across multiple email and device platforms, not just your organization's

Case Study: Redesign for Responsive Left: A typical, non- responsive layout

Case Study: Redesign for Responsive Design is too wide Header dates hard to read/cut off on narrow screens CTA at bottom Can't see links in sidebar, sidebar looks too similar to button Icons too small to tap

Case Study: Redesign for Responsive Design is 600px wide for desktop Header is easy to read CTA at top Buttons look button-y! Key info and Details in two columns below CTA Icons made larger and Share button added

Final Results Desktop View Mobile View

Views: Desktop and Mobile One version of HTML, two different views

Before you code... Design your email Define what should happen in the mobile view

Define Mobile View Reduce width from 600px to 300px

Define Mobile View Full-width images need to be scaled down for 300px width

Define Mobile View Columns should stack on top of one another

Define Mobile View Footer links should stack on top of one another Hide dividers between links

Target Cells with ID's ID can only be used once Use for unique elements

Target Cells with Classes Classes can be repeated throughout email Use for similar elements

Use spacer gifs to force widths Apply an ID or Class so width of image can be changed for mobile view

Hiding Elements Eliminate unwanted spacing by adding class=”hide” to table cells Define class inside media query

Media Query Set the max-width Define styles inside the media query 480px is an iPhone 4 flipped sideways Define styles inside the media query @media (max-width: 480px) { /* styles go here */ }

Media Query Define styles using selectors in brackets Fixes a bug in Yahoo Mail Use !important after every single rule Overrides inline styles @media (max-width: 480px) { table[class=”table”] { width:300px !important; }

Media Query Resize the spacer gif @media (max-width: 480px) { ... Subtract the two spacers on the left and right from 300px 300-26-13=261 @media (max-width: 480px) { ... img[id=”bodywidth”] { width:261px !important; }

Media Query Resize header and footer images Separate selectors with commas @media (max-width: 480px) { ... td[id=”header”] img, td[id=”footer”] img { width:100% !important; height:auto !important; }

Media Query Add a class to hide elements from mobile view Include span in order to hide dividers in footer links @media (max-width: 480px) { ... td[class=”hide”], span[class=”hide”] { display:none !important; }

Media Query Stack columns and make them full width @media (max-width: 480px) { ... table[class=”column”] { width:100% !important; display:block !important; }

Media Query Align social icons to the left Give some space above icons @media (max-width: 480px) { ... td[id=”social”] { text-align:left !important; padding-top:20px !important; }

Media Query Stack footer links Give a bit of space beneath each link @media (max-width: 480px) { ... td[id=”footerlinks”] a { display:block !important; margin-bottom:6px !important; }

Completed Media Query @media (max-width: 480px) { table[class="table"] { width:300px !important; } td[id="header"] img, td[id="footer"] img { width:100% !important; height:auto !important; td[class="hide"], span[class="hide"] { display:none !important; img[id="bodywidth"] { width:261px !important; table[class="column"] { width:100% !important; display: block !important; } td[id="social"] { text-align:left !important; padding-top:20px !important; td[id="footerlinks"] a { display:block !important; margin-bottom:6px !important;

Voila! Mobile view will be displayed based on screen size set in media query

Testing & Troubleshooting Resize browser window to test Other tools: CyberCrab or Firefox Responsive Design View

Testing & Troubleshooting Use built-in code tools in Chrome & Firefox Screenshot testing of major email clients & devices with Litmus

Congratulations! After Before [ iPhone5 ]

Resources Anatomy of a Perfect Mobile Email Emailology Boilerplate code, Tips & Tricks, Troubleshooting Campaign Monitor Guide to Responsive Email Design Which devices support media queries? Mail Chimp Guide to Email on Mobile Devices Yahoo! Mail issues with @media queries Examples of Responsive Emails by Marketing Land MORE Examples of Responsive Emails Takeaway Design for all Inboxes