17 RESPONSIVE WEB DESIGN.

Slides:



Advertisements
Similar presentations
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Advertisements

XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
4.02 Responsive Web Design Concepts Part 1, Part 2 & Part 3 Designing for mobile devices.
Responsive Web Design Sheri German, Instructor Montgomery College.
Chapter 8 More on Links, Layout, and Mobile Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Responsive Web Design Design websites so that they can adapt to different devices seamlessly. Image by Muhammed RafizeldiMuhammed Rafizeldi.
RESPONSIVE DESIGN Sources: Kadlec, T. (2012). Implementing responsive design. Berkeley, California: New Riders Publishing. MarcotteMarcotte, E. (2010).
4.02 Responsive Web Design Concepts
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
CIT 256 Mobile Web Development Dr. Beryl Hoffman.
Lesson 15: Mobile Design and Layout Introduction to Adobe Dreamweaver CS6 Adobe Certified Associate: Web Communication using Adobe Dreamweaver CS6.
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.
Responsive Design - It’s time for a reality check.
INTRODUCTION TO HTML5 CSS Styles. Understanding Style Sheets  HTML5 enables you to define many different types of content on a web page, including headings,
COMP 135 Web Site Design Intermediate Week 8. Responsive Web Design Responsive Design Adaptive Design.
Chapter 2 Developing a Web Page. Chapter 2 Lessons Introduction 1.Create head content and set page properties 2.Create, import, and format text 3.Add.
Week 8 – Part 3 More on Links, Layout, and Mobile Key Concepts 1.
Copyright 2012 Adobe Systems Incorporated. All rights reserved. ® Copyright 2010 Adobe Systems Incorporated. All rights reserved. ® Copyright 2012 Adobe.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Professor Waterman Cascading Style Sheets (CSS) is a language that works with HTML documents to define the way content is presented. The presentation.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
GO MOBILE. GO RESPONSIVE. 185 mil mobile internet users in India
Responsive Web Design (RWD) MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/11/2016.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Essential Questions What challenges do mobile devices present to Web designers? What are the basic concepts.
And Mobile Web Browsers
How HTML responsiveness translates to PDF
Working with Cascading Style Sheets
Web Development & Design Foundations with HTML5
CNIT131 Internet Basics & Beginning HTML
Implementing Responsive Design UNIT I.
Implementing Responsive Design
A better approach to mobile
Responsive Design and Twitter Bootstrap
Responsive Web Design (RWD)
Responsive Web Pages.
Concepts for fluid layout
Styling For Print From Screen to Paper
CS 321: Human-Computer Interaction Design
Introduction to CSS Media Query - Lesson 11
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Web Browsers & Mobile Web Browsers.
Responsive Images.
Web Development & Design Foundations with HTML5
CS 0134 (term 2181) Jarrett Billingsley
RESPONSIVE WEB DESIGN.
IS1500: Introduction to Web Development
7 More on Links, Layout & Mobile.
Objectives Create a media query Work with the browser viewport
Web Development & Design Foundations with HTML5 8th Edition
CSS part 2 Outro.
Web Development & Design Foundations with HTML5 7th Edition
Responsive Design.
Chapter 8 More on Links, Layout, and Mobile Key Concepts
Responsive Web Design (RWD)
Responsive Web Design (RWD)
Responsive Framework.
Responsive Web Design and Bootstrap
Basics of Web Design Chapter 8 More on Links, Layout, and Mobile Key Concepts Copyright © 2014 Terry Ann Morris, Ed.D.
Responsive Web Design (RWD)
WEB DESIGN FOR MULTIPLE SCREENS
Responsive Web Design and Bootstrap
Web Client Side Technologies Raneem Qaddoura
Web Development & Design Foundations with HTML5
Web Client Side Technologies Raneem Qaddoura
Concepts for fluid layout
And Mobile Web Browsers
And Mobile Web Browsers
Various mobile devices
Presentation transcript:

17 RESPONSIVE WEB DESIGN

What RWD is Fluid layouts Media queries Design strategies and patterns Testing options

Introduction to RWD RWD is a design and production approach that allows a web page to adapt to the screen it is viewed on. The same HTML source is styled differently based on the width of the screen. It ensures mobile users get the same content as other users, with a presentation that optimizes usability. The term was coined by Ethan Marcotte in 2010 in his article “Responsive Web Design” for A List Apart.

Introduction to RWD (cont’d)

The Components of RWD Ethan Marcotte defines the three core components as follows: Fluid layout / flexible grid Elements are sized so they squeeze and flow into the available browser space. Flexible images Images and other embedded media scale to fit their containing elements. CSS media queries These are a way to test for browser features such as viewport width and deliver styles accordingly.

Setting the Viewport Mobile browsers render pages on a canvas called the viewport and then shrink it to fit the screen (device width). To make the viewport the same size as the device width: <meta name="viewport" content="width=device-width, initial-scale="1">

Setting the Viewport <meta name="viewport" content="width=device-width, initial-scale="1"> *turns a regular webpage into a responsive page Tells the browser to set the width of the viewport equal to the width of the device screen (width=device-width) Why? To fit standard websites onto small screens, mobile browsers render the page on a canvas called the viewport and then shrink that viewport down to fit the width of the screen (device width). Example: on iPhones, Mobile Safari sets the viewport width to 980 pixels, so a web page is rendered as though it were on a desktop browser window set to 980 pixels wide. But that rendering gets shrunk down to 320 pixels wide (portrait orientation) viewport element is a re-set – telling the browser to set the width of the content to the width of the device itself, and to scale that content to 1 (100%) on load

Setting the Viewport (cont’d)

Flexible Grids (Fluid Layout)

Fluid Layout Fluid layouts are the best approach for designing for a wide range of screen widths For flexibility, use: percentage measurements flex in flexbox layouts or grid layouts

Making Images Flexible img { max-width: 100%; } flexible images: images scale down to fit the size of their container When the layout gets smaller, the images will scale down to fit the width of the container they are in When the container is larger than the image – the image does not scale larger; it stops at 100% of its original size

Media Queries A media query is a special rule that tests for certain conditions before applying the styles it contains: @media type and (feature: value) { /* styles for browsers that meet this criteria */ } Media queries allow you to combine media types with media features and expressions to control when styles are applied. A few query examples: Is it on a screen or printed? Is the browser at least a certain width? Is the orientation landscape or portrait? uses conditional logic to filter when styles are applied

Media Query Example ex: one set of styles to screen devices and another to a printer

Media Types The first part of a media query identifies the media type. The current media types are all, print, screen, and speech. Example: @media print { /* print-specific styles between the brackets */ } Media types were introduced in CSS2.

Media Query Example @media screen and (orientation: landscape) { body { background: skyblue; } @media screen and (orientation: portrait) { background: coral;

Media Types all: styles apply to all devices print: used for printers and other print-related displays speech: for screen-readers screen: matches all devices that are not print or speech (computer screens, tablets, smart- phones, etc.)

Media Feature Queries CSS3 introduced media feature queries that test for a particular feature of a viewport or device. Example: h1 headings display in Lobster font only when the viewport is at least 40em wide. h1 { font-family: Georgia, serif; } @media screen and (min-width: 40em) { font-family: 'Lobster', cursive; NOTE: min-width and max-width queries are most useful for RWD.

Media Types Media queries can also evaluate specific media features such as width, orientation, and resolution Complete list: https://www.w3schools.com/cssref/css3_pr_mediaquery.asp

Using Media Queries In a style sheet: Put an @media rule in a style sheet to deliver styles based on viewport width. Make sure the @media rule comes after your baseline styles. Determines whether the media type is a screen & whether it is at least 480px wide (greater or equal to 480px) - implies base styles (default style when media condition is not met) will kick in at narrow screen sizes (mobile-first) Tests whether the screen is less than or equal to 700px wide and is in landscape orientation device must pass all of the requirements in order to deliver the enclosed styles

Using Media Queries With external style sheets: Link or @import separate style sheets based on a query: Media queries can also be carried out with the media attribute in the <link> element to conditionally load separate .css files when the conditions are met

Breakpoints A breakpoint is the point at which we use a media query to introduce a style change. Best practice is to create breakpoints for individual parts of the page rather than the entire page at once. Designers generally create the narrow-screen version first and then change components as needed as the screen grows larger. Em-based breakpoints introduce layout changes proportional to font size.

Breakpoints (cont’d.) https://css-tricks.com/snippets/css/media-queries-for-standard-devices/#phone-queries https://responsivedesign.is/develop/browser-feature-support/media-queries-for-common-device-breakpoints/

Designing Responsively You need to pay attention to the following aspects of the page in a responsive design: Content hierarchy Layout Typography Navigation Images Special content like tables and forms

Content Hierarchy The biggest challenge is deciding what is visible in the first screen on small devices. You should strive for content parity across devices. Everyone should have access to the same information, even if it’s not in exactly the same place. Content organization is the most important part of site planning. It’s often handled by information architects or content strategists.

Layout RWD is based on fluid layouts. The most common approach is to start with one column on small devices and add columns as space is available. The optimum width of a text element should be based on a line length of 45 to 75 characters. If lines are much longer, introduce a breakpoint.

Responsive Layout Patterns

Typography Typography should be optimized for different screen sizes. Avoid complicated font styles on small screens. Set font size to keep line lengths between 45 to 75 characters. Line height should generally be larger on larger screens. Left and right margins can increase on larger screens.

Navigation Options

Navigation Options (cont’d)

Images Use responsive image markup techniques. Serve the smallest file size version by default. Make sure important image detail isn’t lost at smaller sizes. Allow zooming or provide a cropped version. Avoid text in graphics or provide alternative versions with larger type for small screens.

Site Testing Testing sites in a wide variety of browsing environments is critical: Real devices The best way to test is on actual smartphones, tablets, etc. Emulators Use a desktop application that simulates device hardware and software. Browser testing services Subscription-based services show how your site looks on a huge variety of browsers.