SlideShare a Scribd company logo
1 of 27
17
RESPONSIVE WEB DESIGN
OVERVIEW
• 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:
• A 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).
• For example, a web page be rendered on a 980-pixel viewport
and shrunk down to fit a 480-pixel wide screen.
• To make the viewport the same size as the device width:
<meta name="viewport"
content="width=device-width, initial-scale="1">
Setting the Viewport (cont’d)
Flexible Grids (Fluid Layout)
Flexible Grid (Fluid Layout )
• Fluid layouts are the best approach for designing for a wide
range of screen widths
• For flexibility, use:
• fr and minmax() and content-based grid track values
• flex in Flexbox
• percentage measurements
Making Images Flexible
To make images scale down to fit the size of their container:
img { max-width: 100%; }
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 */
}
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?
Media Query Example
@media screen and (orientation: landscape) {
body {
background: skyblue;
}
}
@media screen and (orientation: portrait) {
body {
background: coral;
}
}
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 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) {
h1 {
font-family: 'Lobster', cursive;
}
}
NOTE: min-width and max-width queries are most useful for RWD.
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.
With external style sheets:
• Link or @import separate style sheets based on a query:
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="2column-styles.css"
media="screen and (min-width:1024px)">
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.)
A few breakpoints
used by Etsy.com
(2018)
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.
Special Content
• Forms
Design for efficiency and flexibility (Flexbox)
• Tables
Research responsive table patterns
• Interactive elements
— Scale videos proportionally.
— Explore alternatives that work better on small screens (for
example, linking to a map app instead of just providing a small
embedded map).
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.

More Related Content

What's hot

Intro to Web Design 6e Chapter 4
Intro to Web Design 6e Chapter 4 Intro to Web Design 6e Chapter 4
Intro to Web Design 6e Chapter 4 Steve Guinan
 
HTML5 on Mobile(For Designer)
HTML5 on Mobile(For Designer)HTML5 on Mobile(For Designer)
HTML5 on Mobile(For Designer)Adam Lu
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinSuzanne Dergacheva
 
Steph's Html5 and css presentation
Steph's Html5 and css presentationSteph's Html5 and css presentation
Steph's Html5 and css presentationstephy123123
 
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon BaltimoreCreating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon BaltimoreSuzanne Dergacheva
 
Intro to Web Design 6e Chapter 7
Intro to Web Design 6e Chapter 7Intro to Web Design 6e Chapter 7
Intro to Web Design 6e Chapter 7Steve Guinan
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media QueriesRuss Weakley
 
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech DayCreating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech DaySuzanne Dergacheva
 
Drupal: Organizing Content for Multiple Audiences
Drupal: Organizing Content for Multiple AudiencesDrupal: Organizing Content for Multiple Audiences
Drupal: Organizing Content for Multiple AudiencesiFactory
 
Creating a Reusable Drupal Website for Higher Education - Webinar
Creating a Reusable Drupal Website for Higher Education - WebinarCreating a Reusable Drupal Website for Higher Education - Webinar
Creating a Reusable Drupal Website for Higher Education - WebinarSuzanne Dergacheva
 

What's hot (20)

Ppt ch05
Ppt ch05Ppt ch05
Ppt ch05
 
Ppt ch10
Ppt ch10Ppt ch10
Ppt ch10
 
Ppt ch08
Ppt ch08Ppt ch08
Ppt ch08
 
Intro to Web Design 6e Chapter 4
Intro to Web Design 6e Chapter 4 Intro to Web Design 6e Chapter 4
Intro to Web Design 6e Chapter 4
 
HTML5 on Mobile(For Designer)
HTML5 on Mobile(For Designer)HTML5 on Mobile(For Designer)
HTML5 on Mobile(For Designer)
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
 
Ppt ch02
Ppt ch02Ppt ch02
Ppt ch02
 
Steph's Html5 and css presentation
Steph's Html5 and css presentationSteph's Html5 and css presentation
Steph's Html5 and css presentation
 
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon BaltimoreCreating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
 
Ppt ch02
Ppt ch02Ppt ch02
Ppt ch02
 
Intro to Web Design 6e Chapter 7
Intro to Web Design 6e Chapter 7Intro to Web Design 6e Chapter 7
Intro to Web Design 6e Chapter 7
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech DayCreating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
 
Ppt ch11
Ppt ch11Ppt ch11
Ppt ch11
 
Web dev-101
Web dev-101Web dev-101
Web dev-101
 
Ppt ch09
Ppt ch09Ppt ch09
Ppt ch09
 
Drupal: Organizing Content for Multiple Audiences
Drupal: Organizing Content for Multiple AudiencesDrupal: Organizing Content for Multiple Audiences
Drupal: Organizing Content for Multiple Audiences
 
Creating a Reusable Drupal Website for Higher Education - Webinar
Creating a Reusable Drupal Website for Higher Education - WebinarCreating a Reusable Drupal Website for Higher Education - Webinar
Creating a Reusable Drupal Website for Higher Education - Webinar
 
Approaches to Responsive Wen Design & Development
Approaches to Responsive Wen Design & DevelopmentApproaches to Responsive Wen Design & Development
Approaches to Responsive Wen Design & Development
 
CIS1203 Web Design Principles - Part 2
CIS1203 Web Design Principles - Part 2CIS1203 Web Design Principles - Part 2
CIS1203 Web Design Principles - Part 2
 

Similar to Chapter 17: Responsive Web Design

Responsive Web design Zambig
Responsive Web design ZambigResponsive Web design Zambig
Responsive Web design ZambigTribune Media
 
Advancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web DesignAdvancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web DesignAdvancio
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web DesignMike Wilcox
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013Marc D Anderson
 
Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Frédéric Harper
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignChiheb Chebbi
 
Responsive web design ppt
Responsive web design pptResponsive web design ppt
Responsive web design pptNAWAZ KHAN
 
Media queries and frameworks
Media queries and frameworksMedia queries and frameworks
Media queries and frameworksNicole Ryan
 
Week 8 - Interactive News Editing and Producing
Week 8 - Interactive News Editing and ProducingWeek 8 - Interactive News Editing and Producing
Week 8 - Interactive News Editing and Producingkurtgessler
 
Design Like a Pro: Building Mobile-Responsive HMIs in Ignition Perspective
Design Like a Pro: Building Mobile-Responsive HMIs in Ignition PerspectiveDesign Like a Pro: Building Mobile-Responsive HMIs in Ignition Perspective
Design Like a Pro: Building Mobile-Responsive HMIs in Ignition PerspectiveInductive Automation
 
Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25Christian Rokitta
 
How to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive WebsiteHow to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive WebsiteJj Jurgens
 
Beginning Site Design
Beginning Site DesignBeginning Site Design
Beginning Site Designjadkin32
 
FITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFrédéric Harper
 
Web programming css
Web programming cssWeb programming css
Web programming cssUma mohan
 
Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)
Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)
Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)Christian Rokitta
 
CSS3: Simply Responsive
CSS3: Simply ResponsiveCSS3: Simply Responsive
CSS3: Simply ResponsiveDenise Jacobs
 
Etec 632 web design
Etec 632 web designEtec 632 web design
Etec 632 web designahalemano
 

Similar to Chapter 17: Responsive Web Design (20)

Responsive Web design Zambig
Responsive Web design ZambigResponsive Web design Zambig
Responsive Web design Zambig
 
Advancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web DesignAdvancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web Design
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013
 
Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Responsive web design ppt
Responsive web design pptResponsive web design ppt
Responsive web design ppt
 
Media queries and frameworks
Media queries and frameworksMedia queries and frameworks
Media queries and frameworks
 
Week 8 - Interactive News Editing and Producing
Week 8 - Interactive News Editing and ProducingWeek 8 - Interactive News Editing and Producing
Week 8 - Interactive News Editing and Producing
 
Design Like a Pro: Building Mobile-Responsive HMIs in Ignition Perspective
Design Like a Pro: Building Mobile-Responsive HMIs in Ignition PerspectiveDesign Like a Pro: Building Mobile-Responsive HMIs in Ignition Perspective
Design Like a Pro: Building Mobile-Responsive HMIs in Ignition Perspective
 
Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25
 
How to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive WebsiteHow to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive Website
 
Beginning Site Design
Beginning Site DesignBeginning Site Design
Beginning Site Design
 
FITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web Design
 
Web programming css
Web programming cssWeb programming css
Web programming css
 
Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)
Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)
Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)
 
CSS3: Simply Responsive
CSS3: Simply ResponsiveCSS3: Simply Responsive
CSS3: Simply Responsive
 
Web Design Norms
Web Design NormsWeb Design Norms
Web Design Norms
 
Design responsively
Design responsivelyDesign responsively
Design responsively
 
Etec 632 web design
Etec 632 web designEtec 632 web design
Etec 632 web design
 

More from Steve Guinan

Chapter 18: Transitions, Transforms, and Animation
Chapter 18: Transitions, Transforms, and AnimationChapter 18: Transitions, Transforms, and Animation
Chapter 18: Transitions, Transforms, and AnimationSteve Guinan
 
Chapter 15: Floating and Positioning
Chapter 15: Floating and Positioning Chapter 15: Floating and Positioning
Chapter 15: Floating and Positioning Steve Guinan
 
Chapter 14: Box Model
Chapter 14: Box ModelChapter 14: Box Model
Chapter 14: Box ModelSteve Guinan
 
Chapter 13: Colors and Backgrounds
Chapter 13: Colors and BackgroundsChapter 13: Colors and Backgrounds
Chapter 13: Colors and BackgroundsSteve Guinan
 
Chapter 12: CSS Part 2
Chapter 12: CSS Part 2Chapter 12: CSS Part 2
Chapter 12: CSS Part 2Steve Guinan
 
Chapter 11: Intro to CSS
Chapter 11: Intro to CSSChapter 11: Intro to CSS
Chapter 11: Intro to CSSSteve Guinan
 
HubSpot Student Instructions
HubSpot Student InstructionsHubSpot Student Instructions
HubSpot Student InstructionsSteve Guinan
 
Ch 5: Marking up Text
Ch 5: Marking up TextCh 5: Marking up Text
Ch 5: Marking up TextSteve Guinan
 
Ch 2: How the Web Works
Ch 2: How the Web WorksCh 2: How the Web Works
Ch 2: How the Web WorksSteve Guinan
 
Intro to Web Design 6e Chapter 6
Intro to Web Design 6e Chapter 6Intro to Web Design 6e Chapter 6
Intro to Web Design 6e Chapter 6Steve Guinan
 
Intro to Web Design 6e Chapter 5
Intro to Web Design 6e Chapter 5Intro to Web Design 6e Chapter 5
Intro to Web Design 6e Chapter 5Steve Guinan
 
Intro to Web Design 6e Chapter 3
Intro to Web Design 6e Chapter 3 Intro to Web Design 6e Chapter 3
Intro to Web Design 6e Chapter 3 Steve Guinan
 
Intro to Web Design 6e Chapter 2
Intro to Web Design 6e Chapter 2 Intro to Web Design 6e Chapter 2
Intro to Web Design 6e Chapter 2 Steve Guinan
 
Intro to Web Design 6e Chapter 1
Intro to Web Design 6e Chapter 1Intro to Web Design 6e Chapter 1
Intro to Web Design 6e Chapter 1Steve Guinan
 
Internet Search Presentation
Internet Search PresentationInternet Search Presentation
Internet Search PresentationSteve Guinan
 
Elements of Design
Elements of DesignElements of Design
Elements of DesignSteve Guinan
 

More from Steve Guinan (20)

Chapter 18: Transitions, Transforms, and Animation
Chapter 18: Transitions, Transforms, and AnimationChapter 18: Transitions, Transforms, and Animation
Chapter 18: Transitions, Transforms, and Animation
 
Chapter 15: Floating and Positioning
Chapter 15: Floating and Positioning Chapter 15: Floating and Positioning
Chapter 15: Floating and Positioning
 
Chapter 9: Forms
Chapter 9: FormsChapter 9: Forms
Chapter 9: Forms
 
Chapter 8: Tables
Chapter 8: TablesChapter 8: Tables
Chapter 8: Tables
 
Chapter 14: Box Model
Chapter 14: Box ModelChapter 14: Box Model
Chapter 14: Box Model
 
Chapter 13: Colors and Backgrounds
Chapter 13: Colors and BackgroundsChapter 13: Colors and Backgrounds
Chapter 13: Colors and Backgrounds
 
Chapter 12: CSS Part 2
Chapter 12: CSS Part 2Chapter 12: CSS Part 2
Chapter 12: CSS Part 2
 
Chapter 11: Intro to CSS
Chapter 11: Intro to CSSChapter 11: Intro to CSS
Chapter 11: Intro to CSS
 
HubSpot Student Instructions
HubSpot Student InstructionsHubSpot Student Instructions
HubSpot Student Instructions
 
Ch 6: Links
Ch 6: LinksCh 6: Links
Ch 6: Links
 
Ch 5: Marking up Text
Ch 5: Marking up TextCh 5: Marking up Text
Ch 5: Marking up Text
 
Ch 2: How the Web Works
Ch 2: How the Web WorksCh 2: How the Web Works
Ch 2: How the Web Works
 
Intro to Web Design 6e Chapter 6
Intro to Web Design 6e Chapter 6Intro to Web Design 6e Chapter 6
Intro to Web Design 6e Chapter 6
 
Intro to Web Design 6e Chapter 5
Intro to Web Design 6e Chapter 5Intro to Web Design 6e Chapter 5
Intro to Web Design 6e Chapter 5
 
Intro to Web Design 6e Chapter 3
Intro to Web Design 6e Chapter 3 Intro to Web Design 6e Chapter 3
Intro to Web Design 6e Chapter 3
 
Intro to Web Design 6e Chapter 2
Intro to Web Design 6e Chapter 2 Intro to Web Design 6e Chapter 2
Intro to Web Design 6e Chapter 2
 
Intro to Web Design 6e Chapter 1
Intro to Web Design 6e Chapter 1Intro to Web Design 6e Chapter 1
Intro to Web Design 6e Chapter 1
 
Internet Search Presentation
Internet Search PresentationInternet Search Presentation
Internet Search Presentation
 
Elements of Design
Elements of DesignElements of Design
Elements of Design
 
Design Principles
Design PrinciplesDesign Principles
Design Principles
 

Recently uploaded

Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our EscortsCall Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escortsindian call girls near you
 
Denver Web Design brochure for public viewing
Denver Web Design brochure for public viewingDenver Web Design brochure for public viewing
Denver Web Design brochure for public viewingbigorange77
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
Russian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service ThaneRussian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service ThaneCall girls in Ahmedabad High profile
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of indiaimessage0108
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 

Recently uploaded (20)

Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our EscortsCall Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
 
Denver Web Design brochure for public viewing
Denver Web Design brochure for public viewingDenver Web Design brochure for public viewing
Denver Web Design brochure for public viewing
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
Russian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service ThaneRussian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of india
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 

Chapter 17: Responsive Web Design

  • 2. OVERVIEW • What RWD is • Fluid layouts • Media queries • Design strategies and patterns • Testing options
  • 3. 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.
  • 4. Introduction to RWD (cont’d)
  • 5. The Components of RWD Ethan Marcotte defines the three core components as follows: • A 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.
  • 6. Setting the Viewport • Mobile browsers render pages on a canvas called the viewport and then shrink it to fit the screen (device width). • For example, a web page be rendered on a 980-pixel viewport and shrunk down to fit a 480-pixel wide screen. • To make the viewport the same size as the device width: <meta name="viewport" content="width=device-width, initial-scale="1">
  • 7. Setting the Viewport (cont’d)
  • 9. Flexible Grid (Fluid Layout ) • Fluid layouts are the best approach for designing for a wide range of screen widths • For flexibility, use: • fr and minmax() and content-based grid track values • flex in Flexbox • percentage measurements
  • 10. Making Images Flexible To make images scale down to fit the size of their container: img { max-width: 100%; }
  • 11. 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 */ } 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?
  • 12. Media Query Example @media screen and (orientation: landscape) { body { background: skyblue; } } @media screen and (orientation: portrait) { body { background: coral; } }
  • 13. 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.
  • 14. 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) { h1 { font-family: 'Lobster', cursive; } } NOTE: min-width and max-width queries are most useful for RWD.
  • 15. 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. With external style sheets: • Link or @import separate style sheets based on a query: <link rel="stylesheet" href="styles.css"> <link rel="stylesheet" href="2column-styles.css" media="screen and (min-width:1024px)">
  • 16. 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.
  • 17. Breakpoints (cont’d.) A few breakpoints used by Etsy.com (2018)
  • 18. 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
  • 19. 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.
  • 20. 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.
  • 22. 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.
  • 25. 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.
  • 26. Special Content • Forms Design for efficiency and flexibility (Flexbox) • Tables Research responsive table patterns • Interactive elements — Scale videos proportionally. — Explore alternatives that work better on small screens (for example, linking to a map app instead of just providing a small embedded map).
  • 27. 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.