SlideShare a Scribd company logo
Chapter 6
Responsive Design Part 2:
Designing for Tablet and
Desktop Devices
Web Design with
HTML5 & CSS3
8th Edition
• Understand and use media query expressions
• Explain the design principles of a tablet website
• Insert a media query to target tablet viewports
• Create style rules for tablet viewports
• Explain the design principles of a desktop website
• Insert a media query to target desktop viewports
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 2
Chapter Objectives
• Create style rules for desktop viewports
• Identify and modify breakpoints
• Explain pseudo-classes
• Apply pseudo-classes to a website
• Explain linear and radial gradients
• Apply a linear gradient to a webpage for a desktop
viewport
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 3
Chapter Objectives (continued)
• Media query
– Detects the media type and the capabilities of the
device that the browser is running on
– It applies styles that work well for that situation, based
on the information provided
– Applies styles to move, hide, or display content on the
page, change text or colors, or add any other styles to
make the page easier to read in a particular situation
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 4
Using Media Queries
– The following code provides a basic example of a
media query inserted into the link tag of an HTML
page:
<link rel="stylesheet"
href="css/styles.css"media="screen">
<link rel="stylesheet“
href="css/stylesprint.css“
media="print">
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 5
Using Media Queries (continued
2)
• Breakpoint
– It is set to understand the code and syntax of how a
media query detects viewport size
– It is the point at which a webpage is required to
change
– It is where different styles are applied to the webpage
to cause it to change in a way that makes it easier to
read and navigate for a particular situation
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 6
Using Media Queries (continued
3)
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 7
Using Media Queries (continued
4)
• The Table 6–1 lists the three common viewport
sizes
• A media query can use a logical expression to test
whether a viewport has reached a particular
breakpoint
• The logical expression includes the name of a
media query feature, a characteristic of the
environment, and a breakpoint value to be tested
• If the logical expression evaluates to “true,” the
media query applies the styles that follow
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 8
Media Query Expressions
• A media query can also test for both minimum
and maximum breakpoints
– Example:
<link rel="stylesheet"
href="css/styles-
tablet.css"media="screen and (min-
width: 481px) and (max-width: 768px)">
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 9
Media Query Expressions
(continued 1)
– The code directs browsers to apply the styles-
tablet.css stylesheet in the css folder when screens
have a viewport width between 481px and 768px
– When testing for minimum and maximum widths, the
word “and” separates each part of the media attribute
value
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 10
Media Query Expressions
(continued 2)
• Another way to implement media queries is to
code them directly into a single CSS file using the
@media rule
• The three most common types of media are
screen, print, and all
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 11
Media Query Expressions
(continued 3)
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 12
Media Query Expressions
(continued 4)
• Table 6–2 lists common media query features that
can be used in a logical expression
• In a mobile-first strategy, the mobile styles are
listed first as they are the default styles
• Next, media queries are used to add styles for
larger viewports, progressing from tablet to
desktop. Styles created for the smaller viewports
apply to larger viewports by default
• To modify the appearance of an element for a
larger viewport, a media query is created for the
larger viewport, and then a new style is created
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 13
Adding Media Queries to an
External Style Sheet
• With so many tablet sizes, it is difficult to design a
“one size fits all” layout for a tablet device
• However, with the use of responsive web design
and media queries, designing multiple tablet
layouts is not required
• If a particular tablet device has a viewport smaller
than the minimum size specified in the media
query, then the layout will default to the mobile
viewport layout
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 14
Designing for Tablet Viewports
• Figure 6–3 shows the code to create a media
query for a tablet viewport
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 15
Designing for Tablet Viewports
(continued 1)
• Page Design for a Tablet Viewport
– When designing for a tablet viewport
oMaintain the same color scheme, typography, and general
look of the website
oThe appearance of the website should look the same from
viewport to viewport
oThe only thing that should change is layout and placement
of content
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 16
Designing for Tablet Viewports
(continued 2)
– To determine the ideal layout for a website’s tablet
viewport, review the mobile site to confirm where the
content should be added and if any content should be
hidden
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 17
Designing for Tablet Viewports
(continued 3)
• Navigation Design for a Tablet Viewport
– It is not necessary to maintain a vertical list of
navigation buttons as a tablet screen is larger than a
smartphone screen
– Align the navigation buttons in a horizontal line
– This frees space for the main content below the
navigation area, improving its visibility by displaying it
in the middle of the screen
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 18
Designing for Tablet Viewports
(continued 4)
– To accomplish this design, create a style rule to display
the navigation list items as a single horizontal line
when displayed in a tablet viewport
– Add other properties and values that override the
defaults already set for the mobile viewport
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 19
Designing for Tablet Viewports
(continued 5)
• Figure 6–5 shows the code to style the navigation
area for a tablet viewport
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 20
Designing for Tablet Viewports
(continued 6)
• Figure 6–8 shows the code to style the style the
main element for a tablet viewport
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 21
Designing for Tablet Viewports
(continued 7)
• Figure 6–10 shows the code to show and hide
content for a tablet viewport
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 22
Designing for Tablet Viewports
(continued 8)
• When designing for desktop viewports
– Use simple, intuitive navigation, clear images, and
typography and apply the same color scheme
– Maintain the same look and feel of the site, but
change some formatting to best accommodate the
desktop viewport
– It also provides an opportunity for a multiple-column
layout
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 23
Designing for Desktop Viewports
• Breakpoint
– It is the point at which different styles are applied to a
webpage depending on the viewport
– Set breakpoints as determined by the content on the
page
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 24
Modifying Breakpoints
• Pseudo-classes
– They allow changes to the style of a link based on four
link states: link, visited, hover, and active
– They must be used in the following order: link, visited,
hover, active
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 25
Using Pseudo-Classes
• The Table 6–3 describes each link state
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 26
Using Pseudo-Classes (continued
1)
• A pseudo-class is attached to a selector with a
colon to specify a state or relation to the selector
to give the web developer more control over that
selector
• A unique style for normal, visited, hover, and
active links is defined by creating four separate
style rules with a:link, a:visited, a:hover, and
a:active as the selectors
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 27
Using Pseudo-Classes (continued
2)
• It is not necessary to use all of the pseudo-
classes. However, if it is omitted from the design,
it is important to maintain the same order of the
pseudo-class styles in the CSS code
• They are used in a desktop viewport
• They are not used in mobile and tablet devices as
they do not have a hover or a click option
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 28
Using Pseudo-Classes (continued
3)
• Figure 6–45 shows the code for link and visited
pseudo-classes
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 29
Using Pseudo-Classes (continued
4)
• Figure 6–46 shows the code for hover and active
pseudo-classes
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 30
Using Pseudo-Classes (continued
5)
• Gradient
– Is a gradual transition from one color to another
–CSS3 has two types of gradients: linear and
radial
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 31
Using Gradients
• Linear Gradient
– It can transition from several different angles
– The default transition is from the top to the bottom
– It can also transition up, left, right, or diagonally
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 32
Using Gradients (continued 1)
• Linear Gradient
– Use the linear-gradient property to create it
– The following is an example of how to apply a linear
gradient:
body {
background: linear- gradient(white,
blue);
}
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 33
Using Gradients (continued 2)
• Linear Gradient
– To provide support for major browsers, use the
following prefixes:
-moz- for Mozilla Firefox
-o- for Opera
-webkit- for Google Chrome and Safari
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 34
Using Gradients (continued 3)
• The following example of a linear gradient
includes all browser support prefixes:
body {
background: -moz-linear-gradient(white,
blue);
background: -o-linear-
gradient(white, blue);
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 35
Using Gradients (continued 4)
background: -webkit-linear-
gradient(white, blue);
background: linear-gradient(white,
blue);
}
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 36
Using Gradients (continued 5)
• The Table 6–4 provides an overview of linear
gradients
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 37
Using Gradients (continued 6)
• Radial gradients
– They are specified by their center
– The color begins in the center and transitions in a
radial direction to another color or colors
– To create a radial gradient, at least two colors must be
specified
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 38
Using Gradients (continued 7)
• The following is an example of a radial gradient:
body {
background: -moz-radial-
gradient(red, white, blue);
background: -o-radial-
gradient(red, white, blue);
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 39
Using Gradients (continued 8)
background: -webkit-radial-
gradient(red, white, blue);
background: radial-gradient(red,
white, blue);
}
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 40
Using Gradients (continued 9)
• Figure 6–51 shows the code for creating a new
style rule to apply a linear gradient for a desktop
viewport
Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 41
Using Gradients (continued 10)
Chapter 6 Complete
HTML
8th Edition

More Related Content

What's hot

An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOM
Mindy McAdams
 
Bootstrap
BootstrapBootstrap
Bootstrap
AvinashChunduri2
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
Arulmurugan Rajaraman
 
Bootstrap ppt
Bootstrap pptBootstrap ppt
Bootstrap ppt
Ishtdeep Hora
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
Presentation of bootstrap
Presentation of bootstrapPresentation of bootstrap
Presentation of bootstrap
1amitgupta
 
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Nuzhat Memon
 
Lecture-3: Introduction to html - Basic Structure & Block Building
Lecture-3: Introduction to html - Basic Structure & Block BuildingLecture-3: Introduction to html - Basic Structure & Block Building
Lecture-3: Introduction to html - Basic Structure & Block Building
Mubashir Ali
 
Html training slide
Html training slideHtml training slide
Html training slide
villupuramtraining
 
Bootstrap 3
Bootstrap 3Bootstrap 3
Bootstrap 3
Lanh Le
 
Javascript
JavascriptJavascript
Javascript
Vibhor Grover
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Amit Tyagi
 
Html,javascript & css
Html,javascript & cssHtml,javascript & css
Html,javascript & css
Predhin Sapru
 
HTML Introduction, HTML History, HTML Uses, HTML benifits
HTML Introduction, HTML History, HTML Uses, HTML benifitsHTML Introduction, HTML History, HTML Uses, HTML benifits
HTML Introduction, HTML History, HTML Uses, HTML benifits
Pro Guide
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
Singsys Pte Ltd
 
Introduction to BOOTSTRAP
Introduction to BOOTSTRAPIntroduction to BOOTSTRAP
Introduction to BOOTSTRAP
Jeanie Arnoco
 
Page layout with css
Page layout with cssPage layout with css
Page layout with css
Er. Nawaraj Bhandari
 
Basics of JavaScript
Basics of JavaScriptBasics of JavaScript
Basics of JavaScript
Bala Narayanan
 

What's hot (20)

An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOM
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
Bootstrap ppt
Bootstrap pptBootstrap ppt
Bootstrap ppt
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Jquery
JqueryJquery
Jquery
 
Presentation of bootstrap
Presentation of bootstrapPresentation of bootstrap
Presentation of bootstrap
 
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
 
Lecture-3: Introduction to html - Basic Structure & Block Building
Lecture-3: Introduction to html - Basic Structure & Block BuildingLecture-3: Introduction to html - Basic Structure & Block Building
Lecture-3: Introduction to html - Basic Structure & Block Building
 
Html training slide
Html training slideHtml training slide
Html training slide
 
Bootstrap 3
Bootstrap 3Bootstrap 3
Bootstrap 3
 
Javascript
JavascriptJavascript
Javascript
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Html,javascript & css
Html,javascript & cssHtml,javascript & css
Html,javascript & css
 
HTML Introduction, HTML History, HTML Uses, HTML benifits
HTML Introduction, HTML History, HTML Uses, HTML benifitsHTML Introduction, HTML History, HTML Uses, HTML benifits
HTML Introduction, HTML History, HTML Uses, HTML benifits
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
 
Introduction to BOOTSTRAP
Introduction to BOOTSTRAPIntroduction to BOOTSTRAP
Introduction to BOOTSTRAP
 
Page layout with css
Page layout with cssPage layout with css
Page layout with css
 
Basics of JavaScript
Basics of JavaScriptBasics of JavaScript
Basics of JavaScript
 

Viewers also liked

Chapter 2 | Website design & development
Chapter 2  | Website design & developmentChapter 2  | Website design & development
Chapter 2 | Website design & development
MikaStuttaford
 
Chapter 2 | Website design & development - pf
Chapter 2  | Website design & development - pfChapter 2  | Website design & development - pf
Chapter 2 | Website design & development - pf
MikaStuttaford
 
Intro To ECAT
Intro To ECATIntro To ECAT
Intro To ECAT
cloeven
 
Chapter 12
Chapter 12Chapter 12
CSS3 notes
CSS3 notesCSS3 notes
CSS3 notes
Rex Wang
 
CSS
CSSCSS
HTML: Chapter 01
HTML: Chapter 01HTML: Chapter 01
HTML: Chapter 01
Steve Guinan
 
CSS - Basics
CSS - BasicsCSS - Basics
CSS - Basics
Shubham_Saurabh
 
HTML & CSS: Chapter 04
HTML & CSS: Chapter 04HTML & CSS: Chapter 04
HTML & CSS: Chapter 04
Steve Guinan
 
Unit 6, Lesson 3 - Vectors
Unit 6, Lesson 3 - VectorsUnit 6, Lesson 3 - Vectors
Unit 6, Lesson 3 - Vectors
judan1970
 
Breadboard
BreadboardBreadboard
Breadboard
EMEC101
 
Web Engineering - Basic CSS Properties
Web Engineering - Basic CSS PropertiesWeb Engineering - Basic CSS Properties
Web Engineering - Basic CSS Properties
Nosheen Qamar
 
Vernier caliper
Vernier caliperVernier caliper
Vernier caliper
Abinashpapu
 
Types of Layouts by ADMEC Multimedia Institute
Types of Layouts by ADMEC Multimedia InstituteTypes of Layouts by ADMEC Multimedia Institute
Types of Layouts by ADMEC Multimedia Institute
Ravi Bhadauria
 
Spline Interpolation
Spline InterpolationSpline Interpolation
Spline Interpolation
aiQUANT
 

Viewers also liked (20)

Chapter 2 | Website design & development
Chapter 2  | Website design & developmentChapter 2  | Website design & development
Chapter 2 | Website design & development
 
Chapter 2 | Website design & development - pf
Chapter 2  | Website design & development - pfChapter 2  | Website design & development - pf
Chapter 2 | Website design & development - pf
 
Chapter 25
Chapter 25Chapter 25
Chapter 25
 
Intro To ECAT
Intro To ECATIntro To ECAT
Intro To ECAT
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
Chapter 19
Chapter 19Chapter 19
Chapter 19
 
CSS3 notes
CSS3 notesCSS3 notes
CSS3 notes
 
CSS
CSSCSS
CSS
 
HTML: Chapter 01
HTML: Chapter 01HTML: Chapter 01
HTML: Chapter 01
 
CSS - Basics
CSS - BasicsCSS - Basics
CSS - Basics
 
HTML & CSS: Chapter 04
HTML & CSS: Chapter 04HTML & CSS: Chapter 04
HTML & CSS: Chapter 04
 
Unit 6, Lesson 3 - Vectors
Unit 6, Lesson 3 - VectorsUnit 6, Lesson 3 - Vectors
Unit 6, Lesson 3 - Vectors
 
Bread board
Bread boardBread board
Bread board
 
Breadboard
BreadboardBreadboard
Breadboard
 
Basic css
Basic cssBasic css
Basic css
 
Web Engineering - Basic CSS Properties
Web Engineering - Basic CSS PropertiesWeb Engineering - Basic CSS Properties
Web Engineering - Basic CSS Properties
 
Thesis Documentation
Thesis DocumentationThesis Documentation
Thesis Documentation
 
Vernier caliper
Vernier caliperVernier caliper
Vernier caliper
 
Types of Layouts by ADMEC Multimedia Institute
Types of Layouts by ADMEC Multimedia InstituteTypes of Layouts by ADMEC Multimedia Institute
Types of Layouts by ADMEC Multimedia Institute
 
Spline Interpolation
Spline InterpolationSpline Interpolation
Spline Interpolation
 

Similar to HTML & CSS: Chapter 06

HTML & CSS: Chapter 05
HTML & CSS: Chapter 05HTML & CSS: Chapter 05
HTML & CSS: Chapter 05
Steve Guinan
 
Media queries and frameworks
Media queries and frameworksMedia queries and frameworks
Media queries and frameworks
Nicole Ryan
 
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
Marc D Anderson
 
Responsive Web Designing Fundamentals
Responsive Web Designing FundamentalsResponsive Web Designing Fundamentals
Responsive Web Designing Fundamentals
ADMEC Multimedia Institute
 
Responsive web designing ppt(1)
Responsive web designing ppt(1)Responsive web designing ppt(1)
Responsive web designing ppt(1)
admecindia1
 
Web Design Phase
Web Design PhaseWeb Design Phase
Web Design Phase
Ahsan Uddin Shan
 
Liquidizer.js: A Responsive Web Design Algorithm
Liquidizer.js: A Responsive Web Design AlgorithmLiquidizer.js: A Responsive Web Design Algorithm
Liquidizer.js: A Responsive Web Design Algorithm
theijes
 
Responsive Web Design ~ Best Practices for Maximizing ROI
Responsive Web Design ~ Best Practices for Maximizing ROIResponsive Web Design ~ Best Practices for Maximizing ROI
Responsive Web Design ~ Best Practices for Maximizing ROI
Juan Carlos Duron
 
Presentation1
Presentation1Presentation1
Presentation1nhuthi
 
Beginning Site Design
Beginning Site DesignBeginning Site Design
Beginning Site Design
jadkin32
 
Responsive Web design Zambig
Responsive Web design ZambigResponsive Web design Zambig
Responsive Web design Zambig
Tribune Media
 
UI Design Patterns for the Web, Part 2
UI Design Patterns for the Web, Part 2UI Design Patterns for the Web, Part 2
UI Design Patterns for the Web, Part 2
Lewis Lin 🦊
 
Understanding the web design and development
Understanding the web design and developmentUnderstanding the web design and development
Understanding the web design and development
Chinthaka Sanjeewa
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
Mike Wilcox
 
Lect-4-Responsive-Web-06032024-082044am.pptx
Lect-4-Responsive-Web-06032024-082044am.pptxLect-4-Responsive-Web-06032024-082044am.pptx
Lect-4-Responsive-Web-06032024-082044am.pptx
zainm7032
 
Introduction to UX for Mesiniaga Academy
Introduction to UX for Mesiniaga AcademyIntroduction to UX for Mesiniaga Academy
Introduction to UX for Mesiniaga Academy
Zainul Zain
 
Responsive Design pros and cons
Responsive Design pros and consResponsive Design pros and cons
Responsive Design pros and cons
mbieschke
 
Windows Phone 8 - 2 Designing WP8 Applications
Windows Phone 8 - 2 Designing WP8 ApplicationsWindows Phone 8 - 2 Designing WP8 Applications
Windows Phone 8 - 2 Designing WP8 ApplicationsOliver Scheer
 
Responsive Web Design for Universal Access 2016
Responsive Web Design for Universal Access 2016Responsive Web Design for Universal Access 2016
Responsive Web Design for Universal Access 2016
Kate Walser
 

Similar to HTML & CSS: Chapter 06 (20)

HTML & CSS: Chapter 05
HTML & CSS: Chapter 05HTML & CSS: Chapter 05
HTML & CSS: Chapter 05
 
Media queries and frameworks
Media queries and frameworksMedia queries and frameworks
Media queries and frameworks
 
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 Designing Fundamentals
Responsive Web Designing FundamentalsResponsive Web Designing Fundamentals
Responsive Web Designing Fundamentals
 
Responsive web designing ppt(1)
Responsive web designing ppt(1)Responsive web designing ppt(1)
Responsive web designing ppt(1)
 
Web Design Phase
Web Design PhaseWeb Design Phase
Web Design Phase
 
Liquidizer.js: A Responsive Web Design Algorithm
Liquidizer.js: A Responsive Web Design AlgorithmLiquidizer.js: A Responsive Web Design Algorithm
Liquidizer.js: A Responsive Web Design Algorithm
 
Responsive Web Design ~ Best Practices for Maximizing ROI
Responsive Web Design ~ Best Practices for Maximizing ROIResponsive Web Design ~ Best Practices for Maximizing ROI
Responsive Web Design ~ Best Practices for Maximizing ROI
 
Presentation1
Presentation1Presentation1
Presentation1
 
Beginning Site Design
Beginning Site DesignBeginning Site Design
Beginning Site Design
 
Responsive Web design Zambig
Responsive Web design ZambigResponsive Web design Zambig
Responsive Web design Zambig
 
UI Design Patterns for the Web, Part 2
UI Design Patterns for the Web, Part 2UI Design Patterns for the Web, Part 2
UI Design Patterns for the Web, Part 2
 
Understanding the web design and development
Understanding the web design and developmentUnderstanding the web design and development
Understanding the web design and development
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
Lect-4-Responsive-Web-06032024-082044am.pptx
Lect-4-Responsive-Web-06032024-082044am.pptxLect-4-Responsive-Web-06032024-082044am.pptx
Lect-4-Responsive-Web-06032024-082044am.pptx
 
Introduction to UX for Mesiniaga Academy
Introduction to UX for Mesiniaga AcademyIntroduction to UX for Mesiniaga Academy
Introduction to UX for Mesiniaga Academy
 
Sadcw 6e chapter6
Sadcw 6e chapter6Sadcw 6e chapter6
Sadcw 6e chapter6
 
Responsive Design pros and cons
Responsive Design pros and consResponsive Design pros and cons
Responsive Design pros and cons
 
Windows Phone 8 - 2 Designing WP8 Applications
Windows Phone 8 - 2 Designing WP8 ApplicationsWindows Phone 8 - 2 Designing WP8 Applications
Windows Phone 8 - 2 Designing WP8 Applications
 
Responsive Web Design for Universal Access 2016
Responsive Web Design for Universal Access 2016Responsive Web Design for Universal Access 2016
Responsive Web Design for Universal Access 2016
 

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 Animation
Steve Guinan
 
Chapter 17: Responsive Web Design
Chapter 17: Responsive Web DesignChapter 17: Responsive Web Design
Chapter 17: Responsive Web Design
Steve Guinan
 
Chapter 15: Floating and Positioning
Chapter 15: Floating and Positioning Chapter 15: Floating and Positioning
Chapter 15: Floating and Positioning
Steve Guinan
 
Chapter 9: Forms
Chapter 9: FormsChapter 9: Forms
Chapter 9: Forms
Steve Guinan
 
Chapter 8: Tables
Chapter 8: TablesChapter 8: Tables
Chapter 8: Tables
Steve Guinan
 
Chapter 14: Box Model
Chapter 14: Box ModelChapter 14: Box Model
Chapter 14: Box Model
Steve Guinan
 
Chapter 13: Colors and Backgrounds
Chapter 13: Colors and BackgroundsChapter 13: Colors and Backgrounds
Chapter 13: Colors and Backgrounds
Steve Guinan
 
Chapter 12: CSS Part 2
Chapter 12: CSS Part 2Chapter 12: CSS Part 2
Chapter 12: CSS Part 2
Steve Guinan
 
Chapter 11: Intro to CSS
Chapter 11: Intro to CSSChapter 11: Intro to CSS
Chapter 11: Intro to CSS
Steve Guinan
 
Chapter 23: Web Images
Chapter 23: Web ImagesChapter 23: Web Images
Chapter 23: Web Images
Steve Guinan
 
Chapter 7: Images
Chapter 7: ImagesChapter 7: Images
Chapter 7: Images
Steve Guinan
 
HubSpot Student Instructions
HubSpot Student InstructionsHubSpot Student Instructions
HubSpot Student Instructions
Steve Guinan
 
Ch 6: Links
Ch 6: LinksCh 6: Links
Ch 6: Links
Steve Guinan
 
Ch 5: Marking up Text
Ch 5: Marking up TextCh 5: Marking up Text
Ch 5: Marking up Text
Steve Guinan
 
Ch 3: Big Concepts
Ch 3: Big ConceptsCh 3: Big Concepts
Ch 3: Big Concepts
Steve Guinan
 
Ch 2: How the Web Works
Ch 2: How the Web WorksCh 2: How the Web Works
Ch 2: How the Web Works
Steve Guinan
 
Ch 1: Getting Started
Ch 1: Getting StartedCh 1: Getting Started
Ch 1: Getting Started
Steve Guinan
 
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
Steve 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 6
Steve 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 5
Steve 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 17: Responsive Web Design
Chapter 17: Responsive Web DesignChapter 17: Responsive Web Design
Chapter 17: Responsive Web Design
 
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
 
Chapter 23: Web Images
Chapter 23: Web ImagesChapter 23: Web Images
Chapter 23: Web Images
 
Chapter 7: Images
Chapter 7: ImagesChapter 7: Images
Chapter 7: Images
 
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 3: Big Concepts
Ch 3: Big ConceptsCh 3: Big Concepts
Ch 3: Big Concepts
 
Ch 2: How the Web Works
Ch 2: How the Web WorksCh 2: How the Web Works
Ch 2: How the Web Works
 
Ch 1: Getting Started
Ch 1: Getting StartedCh 1: Getting Started
Ch 1: Getting Started
 
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
 
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
 

Recently uploaded

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 

Recently uploaded (20)

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 

HTML & CSS: Chapter 06

  • 1. Chapter 6 Responsive Design Part 2: Designing for Tablet and Desktop Devices Web Design with HTML5 & CSS3 8th Edition
  • 2. • Understand and use media query expressions • Explain the design principles of a tablet website • Insert a media query to target tablet viewports • Create style rules for tablet viewports • Explain the design principles of a desktop website • Insert a media query to target desktop viewports Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 2 Chapter Objectives
  • 3. • Create style rules for desktop viewports • Identify and modify breakpoints • Explain pseudo-classes • Apply pseudo-classes to a website • Explain linear and radial gradients • Apply a linear gradient to a webpage for a desktop viewport Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 3 Chapter Objectives (continued)
  • 4. • Media query – Detects the media type and the capabilities of the device that the browser is running on – It applies styles that work well for that situation, based on the information provided – Applies styles to move, hide, or display content on the page, change text or colors, or add any other styles to make the page easier to read in a particular situation Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 4 Using Media Queries
  • 5. – The following code provides a basic example of a media query inserted into the link tag of an HTML page: <link rel="stylesheet" href="css/styles.css"media="screen"> <link rel="stylesheet“ href="css/stylesprint.css“ media="print"> Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 5 Using Media Queries (continued 2)
  • 6. • Breakpoint – It is set to understand the code and syntax of how a media query detects viewport size – It is the point at which a webpage is required to change – It is where different styles are applied to the webpage to cause it to change in a way that makes it easier to read and navigate for a particular situation Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 6 Using Media Queries (continued 3)
  • 7. Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 7 Using Media Queries (continued 4) • The Table 6–1 lists the three common viewport sizes
  • 8. • A media query can use a logical expression to test whether a viewport has reached a particular breakpoint • The logical expression includes the name of a media query feature, a characteristic of the environment, and a breakpoint value to be tested • If the logical expression evaluates to “true,” the media query applies the styles that follow Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 8 Media Query Expressions
  • 9. • A media query can also test for both minimum and maximum breakpoints – Example: <link rel="stylesheet" href="css/styles- tablet.css"media="screen and (min- width: 481px) and (max-width: 768px)"> Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 9 Media Query Expressions (continued 1)
  • 10. – The code directs browsers to apply the styles- tablet.css stylesheet in the css folder when screens have a viewport width between 481px and 768px – When testing for minimum and maximum widths, the word “and” separates each part of the media attribute value Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 10 Media Query Expressions (continued 2)
  • 11. • Another way to implement media queries is to code them directly into a single CSS file using the @media rule • The three most common types of media are screen, print, and all Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 11 Media Query Expressions (continued 3)
  • 12. Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 12 Media Query Expressions (continued 4) • Table 6–2 lists common media query features that can be used in a logical expression
  • 13. • In a mobile-first strategy, the mobile styles are listed first as they are the default styles • Next, media queries are used to add styles for larger viewports, progressing from tablet to desktop. Styles created for the smaller viewports apply to larger viewports by default • To modify the appearance of an element for a larger viewport, a media query is created for the larger viewport, and then a new style is created Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 13 Adding Media Queries to an External Style Sheet
  • 14. • With so many tablet sizes, it is difficult to design a “one size fits all” layout for a tablet device • However, with the use of responsive web design and media queries, designing multiple tablet layouts is not required • If a particular tablet device has a viewport smaller than the minimum size specified in the media query, then the layout will default to the mobile viewport layout Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 14 Designing for Tablet Viewports
  • 15. • Figure 6–3 shows the code to create a media query for a tablet viewport Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 15 Designing for Tablet Viewports (continued 1)
  • 16. • Page Design for a Tablet Viewport – When designing for a tablet viewport oMaintain the same color scheme, typography, and general look of the website oThe appearance of the website should look the same from viewport to viewport oThe only thing that should change is layout and placement of content Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 16 Designing for Tablet Viewports (continued 2)
  • 17. – To determine the ideal layout for a website’s tablet viewport, review the mobile site to confirm where the content should be added and if any content should be hidden Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 17 Designing for Tablet Viewports (continued 3)
  • 18. • Navigation Design for a Tablet Viewport – It is not necessary to maintain a vertical list of navigation buttons as a tablet screen is larger than a smartphone screen – Align the navigation buttons in a horizontal line – This frees space for the main content below the navigation area, improving its visibility by displaying it in the middle of the screen Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 18 Designing for Tablet Viewports (continued 4)
  • 19. – To accomplish this design, create a style rule to display the navigation list items as a single horizontal line when displayed in a tablet viewport – Add other properties and values that override the defaults already set for the mobile viewport Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 19 Designing for Tablet Viewports (continued 5)
  • 20. • Figure 6–5 shows the code to style the navigation area for a tablet viewport Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 20 Designing for Tablet Viewports (continued 6)
  • 21. • Figure 6–8 shows the code to style the style the main element for a tablet viewport Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 21 Designing for Tablet Viewports (continued 7)
  • 22. • Figure 6–10 shows the code to show and hide content for a tablet viewport Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 22 Designing for Tablet Viewports (continued 8)
  • 23. • When designing for desktop viewports – Use simple, intuitive navigation, clear images, and typography and apply the same color scheme – Maintain the same look and feel of the site, but change some formatting to best accommodate the desktop viewport – It also provides an opportunity for a multiple-column layout Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 23 Designing for Desktop Viewports
  • 24. • Breakpoint – It is the point at which different styles are applied to a webpage depending on the viewport – Set breakpoints as determined by the content on the page Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 24 Modifying Breakpoints
  • 25. • Pseudo-classes – They allow changes to the style of a link based on four link states: link, visited, hover, and active – They must be used in the following order: link, visited, hover, active Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 25 Using Pseudo-Classes
  • 26. • The Table 6–3 describes each link state Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 26 Using Pseudo-Classes (continued 1)
  • 27. • A pseudo-class is attached to a selector with a colon to specify a state or relation to the selector to give the web developer more control over that selector • A unique style for normal, visited, hover, and active links is defined by creating four separate style rules with a:link, a:visited, a:hover, and a:active as the selectors Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 27 Using Pseudo-Classes (continued 2)
  • 28. • It is not necessary to use all of the pseudo- classes. However, if it is omitted from the design, it is important to maintain the same order of the pseudo-class styles in the CSS code • They are used in a desktop viewport • They are not used in mobile and tablet devices as they do not have a hover or a click option Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 28 Using Pseudo-Classes (continued 3)
  • 29. • Figure 6–45 shows the code for link and visited pseudo-classes Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 29 Using Pseudo-Classes (continued 4)
  • 30. • Figure 6–46 shows the code for hover and active pseudo-classes Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 30 Using Pseudo-Classes (continued 5)
  • 31. • Gradient – Is a gradual transition from one color to another –CSS3 has two types of gradients: linear and radial Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 31 Using Gradients
  • 32. • Linear Gradient – It can transition from several different angles – The default transition is from the top to the bottom – It can also transition up, left, right, or diagonally Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 32 Using Gradients (continued 1)
  • 33. • Linear Gradient – Use the linear-gradient property to create it – The following is an example of how to apply a linear gradient: body { background: linear- gradient(white, blue); } Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 33 Using Gradients (continued 2)
  • 34. • Linear Gradient – To provide support for major browsers, use the following prefixes: -moz- for Mozilla Firefox -o- for Opera -webkit- for Google Chrome and Safari Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 34 Using Gradients (continued 3)
  • 35. • The following example of a linear gradient includes all browser support prefixes: body { background: -moz-linear-gradient(white, blue); background: -o-linear- gradient(white, blue); Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 35 Using Gradients (continued 4)
  • 36. background: -webkit-linear- gradient(white, blue); background: linear-gradient(white, blue); } Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 36 Using Gradients (continued 5)
  • 37. • The Table 6–4 provides an overview of linear gradients Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 37 Using Gradients (continued 6)
  • 38. • Radial gradients – They are specified by their center – The color begins in the center and transitions in a radial direction to another color or colors – To create a radial gradient, at least two colors must be specified Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 38 Using Gradients (continued 7)
  • 39. • The following is an example of a radial gradient: body { background: -moz-radial- gradient(red, white, blue); background: -o-radial- gradient(red, white, blue); Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 39 Using Gradients (continued 8)
  • 40. background: -webkit-radial- gradient(red, white, blue); background: radial-gradient(red, white, blue); } Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 40 Using Gradients (continued 9)
  • 41. • Figure 6–51 shows the code for creating a new style rule to apply a linear gradient for a desktop viewport Chapter 6: Responsive Design Part 2: Designing for Tablet and Desktop Devices 41 Using Gradients (continued 10)