SlideShare a Scribd company logo
1 of 18
Download to read offline
Responsive web design
FOR ZOMBIES… by zeeshan khan
What is responsive web design?
It’s not a single piece of technology, but rather, a set of techniques and ideas that form a
effect which we term as “responsive”. Responsive design is an approach to web design
that adjusts to the user, from varying browser sizes to changes in device.
Features of a responsive design
1) Fluid
2) Flexible
3) Flowing
4) Device-agnostic
5) Optimised viewing
Why do we need responsive UI?
The spectrum of screen sizes and resolutions is widening every day, and creating a
different version of an application that targets each individual device is not a practical
way forward. This is the problem that responsive web design addresses head on.
Why do we need responsive UI?
It enables to design a single version of the application that would run in different
devices and of browsers of different sizes and would adjust itself according to the
viewport.
Examples of responsive websites
Components of a responsive design
1) Fluid layout
2) Responsive images
3) Responsive fonts
4) CSS Media Queries
Fluid layout
Fluid grids go a few steps beyond the traditional liquid layout. Instead of
designing a layout based on rigid pixels or arbitrary percentage values, a fluid
grid is more carefully designed in terms of proportions.
Fluid layout
Fluid layout
An ideal fluid layout :
1) Works in all major browsers
2) Shrinks to 780px. This accommodates users with 800x600 resolution, with no horizontal
scroll!
3) Grows to 1260px. This accommodates users with 1280x768 resolution and everything in
between.
4) This accommodates 90%+ of all internet users. You could easily make this layout grow larger,
but be mindful of how line-length affects readability. Nobody wants to read a line of text
1980px long.
5) Sidebars are of "equal height" to the main content
6) Page content is centred for users with even higher resolutions.
Responsive images
Basic :
Styling foreground images to adjust to the width of their container is very easy.
img {max-width : 100 % }
embed, object, video { max-width : 100 %}
In most cases, that tiny style rule will do the trick! Once it’s in place, if the container around the
image becomes narrower than the width of the image, then the image will scale down to match
the width of its container. Setting the max-width to 100% also ensures that the image does not
scale larger than its actual size, which would significantly reduce the image’s quality.
Responsive images
The performance problem :
With the responsive image solution outlined above, all devices are fed the same images. Small
icons and logos might not be too bad, but the problem compounds quickly as the images get
larger and heftier.
Retina images exacerbate the problem — you don’t want to send a big Retina image to a device
that isn’t capable of displaying its full detail! Should we really be sending a 990 × 300-pixel 100
KB image meant for desktop viewers to a mobile phone?
Responsive font
Principles of responsive typography :
1) The typography should be of resizable type. That means type that not only resizes
based on the size of the screen, but that is also resizable by the user.
2) The line lengths should be optimized, which maintain readability. That means for
some screens, keeping the content area smaller and the line lengths shorter makes
more sense, even though the content theoretically could stretch wider.
Responsive font
An example of responsive style in LESS :
@media only screen and (max-width: 499px) {
html {
font-size: @basefont-size-singlecol-traditional + 1;
&.BigFont {
font-size: @basefont-size-singlecol-traditional + 7;
}
&.multicol {
font-size: @basefont-size-multicol-traditional + 1;
}
}
}
Media queries
CSS3 media queries basically allow you to gather data about the site visitor and use it to
conditionally apply CSS styles. For our purposes, we’re primarily interested in the min-
width media feature, which allows us to apply specific CSS styles if the browser window
drops below a particular width that we can specify.
In html …
<link rel=“stylesheet” type=“text/css” media = “screen and (max-device-width : 480px)” href =
“example.css” />
In CSS …
@media screen and (max-device-width : 480px) {….}
@import url(“example.css”) screen and (max-device-width : 480px);
Media queries
320 pixels For small screen devices, like phones, held in portrait mode
480 pixels For small screen devices, like phones, held in landscape mode
600 pixels Smaller tablets, like the kindle (600x800) held in portrait
mode
768 pixels Ten-inch tablets like the iPad(768x1024) held in portrait
mode.
1024 pixels Tablets like the iPad held in landscape mode, as well as
certain laptop, netbook.
1200 pixels For widescreen displays, primarily laptop and desktop
browsers
Media features
1) width
2) height
3) color
4) device-width
5) color-index
6) device-height
7) orientation
8) resolution
9) aspect-ratio
Browser issues and compatibilty

More Related Content

Viewers also liked

Radio recommender system for FMHost
Radio recommender system for FMHostRadio recommender system for FMHost
Radio recommender system for FMHostDmitrii Ignatov
 
Social Learning in Networks: Extraction Deterministic Rules
Social Learning in Networks: Extraction Deterministic RulesSocial Learning in Networks: Extraction Deterministic Rules
Social Learning in Networks: Extraction Deterministic RulesDmitrii Ignatov
 
Pattern Mining and Machine Learning for Demographic Sequences
Pattern Mining and Machine Learning for Demographic SequencesPattern Mining and Machine Learning for Demographic Sequences
Pattern Mining and Machine Learning for Demographic SequencesDmitrii Ignatov
 
AIST 2016 Opening Slides
AIST 2016 Opening SlidesAIST 2016 Opening Slides
AIST 2016 Opening SlidesDmitrii Ignatov
 
Putting OAC-triclustering on MapReduce
Putting OAC-triclustering on MapReducePutting OAC-triclustering on MapReduce
Putting OAC-triclustering on MapReduceDmitrii Ignatov
 
A lattice-based consensus clustering
A lattice-based consensus clusteringA lattice-based consensus clustering
A lattice-based consensus clusteringDmitrii Ignatov
 
Pattern-based classification of demographic sequences
Pattern-based classification of demographic sequencesPattern-based classification of demographic sequences
Pattern-based classification of demographic sequencesDmitrii Ignatov
 
Version control with GIT
Version control with GITVersion control with GIT
Version control with GITZeeshan Khan
 
Intro to Data Mining and Machine Learning
Intro to Data Mining and Machine LearningIntro to Data Mining and Machine Learning
Intro to Data Mining and Machine LearningDmitrii Ignatov
 
Context-Aware Recommender System Based on Boolean Matrix Factorisation
Context-Aware Recommender System Based on Boolean Matrix FactorisationContext-Aware Recommender System Based on Boolean Matrix Factorisation
Context-Aware Recommender System Based on Boolean Matrix FactorisationDmitrii Ignatov
 
RAPS: A Recommender Algorithm Based on Pattern Structures
RAPS: A Recommender Algorithm Based on Pattern StructuresRAPS: A Recommender Algorithm Based on Pattern Structures
RAPS: A Recommender Algorithm Based on Pattern StructuresDmitrii Ignatov
 
Поиск частых множеств признаков (товаров) и ассоциативные правила
Поиск частых множеств признаков (товаров) и ассоциативные правилаПоиск частых множеств признаков (товаров) и ассоциативные правила
Поиск частых множеств признаков (товаров) и ассоциативные правилаDmitrii Ignatov
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQueryZeeshan Khan
 

Viewers also liked (14)

Radio recommender system for FMHost
Radio recommender system for FMHostRadio recommender system for FMHost
Radio recommender system for FMHost
 
Social Learning in Networks: Extraction Deterministic Rules
Social Learning in Networks: Extraction Deterministic RulesSocial Learning in Networks: Extraction Deterministic Rules
Social Learning in Networks: Extraction Deterministic Rules
 
Pattern Mining and Machine Learning for Demographic Sequences
Pattern Mining and Machine Learning for Demographic SequencesPattern Mining and Machine Learning for Demographic Sequences
Pattern Mining and Machine Learning for Demographic Sequences
 
AIST 2016 Opening Slides
AIST 2016 Opening SlidesAIST 2016 Opening Slides
AIST 2016 Opening Slides
 
Putting OAC-triclustering on MapReduce
Putting OAC-triclustering on MapReducePutting OAC-triclustering on MapReduce
Putting OAC-triclustering on MapReduce
 
A lattice-based consensus clustering
A lattice-based consensus clusteringA lattice-based consensus clustering
A lattice-based consensus clustering
 
Pattern-based classification of demographic sequences
Pattern-based classification of demographic sequencesPattern-based classification of demographic sequences
Pattern-based classification of demographic sequences
 
Version control with GIT
Version control with GITVersion control with GIT
Version control with GIT
 
Intro to Data Mining and Machine Learning
Intro to Data Mining and Machine LearningIntro to Data Mining and Machine Learning
Intro to Data Mining and Machine Learning
 
Context-Aware Recommender System Based on Boolean Matrix Factorisation
Context-Aware Recommender System Based on Boolean Matrix FactorisationContext-Aware Recommender System Based on Boolean Matrix Factorisation
Context-Aware Recommender System Based on Boolean Matrix Factorisation
 
RAPS: A Recommender Algorithm Based on Pattern Structures
RAPS: A Recommender Algorithm Based on Pattern StructuresRAPS: A Recommender Algorithm Based on Pattern Structures
RAPS: A Recommender Algorithm Based on Pattern Structures
 
Поиск частых множеств признаков (товаров) и ассоциативные правила
Поиск частых множеств признаков (товаров) и ассоциативные правилаПоиск частых множеств признаков (товаров) и ассоциативные правила
Поиск частых множеств признаков (товаров) и ассоциативные правила
 
Paparan bab 12 regulasi dan antitrust
Paparan bab 12 regulasi dan antitrustPaparan bab 12 regulasi dan antitrust
Paparan bab 12 regulasi dan antitrust
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 

Similar to Responsive web design

Responsive Web Designed for your communication and marketing needs
Responsive Web Designed for your communication and marketing needsResponsive Web Designed for your communication and marketing needs
Responsive Web Designed for your communication and marketing needsSEGIC
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignChiheb Chebbi
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignTung Dang
 
Responsive web designing ppt(1)
Responsive web designing ppt(1)Responsive web designing ppt(1)
Responsive web designing ppt(1)admecindia1
 
Media queries and frameworks
Media queries and frameworksMedia queries and frameworks
Media queries and frameworksNicole Ryan
 
Advancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web DesignAdvancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web DesignAdvancio
 
Responsive Web Designs
Responsive Web DesignsResponsive Web Designs
Responsive Web DesignsNusrat Khanom
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignJulia Vi
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practicesmintersam
 
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake OilCSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake Oiljameswillweb
 
Responsive Development (ZendCon 2012)
Responsive Development (ZendCon 2012)Responsive Development (ZendCon 2012)
Responsive Development (ZendCon 2012)Kevin Bruce
 
S. Responsive Web Design
S. Responsive Web DesignS. Responsive Web Design
S. Responsive Web Designshelly3160
 
Optimizing Sites for Mobile Devices
Optimizing Sites for Mobile DevicesOptimizing Sites for Mobile Devices
Optimizing Sites for Mobile Devicesjameswillweb
 
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
 
Stc 2015 preparing legacy projects for responsive design - design issues
Stc 2015   preparing legacy projects for responsive design - design issuesStc 2015   preparing legacy projects for responsive design - design issues
Stc 2015 preparing legacy projects for responsive design - design issuesNeil Perlin
 
Responsive Web design Zambig
Responsive Web design ZambigResponsive Web design Zambig
Responsive Web design ZambigTribune Media
 

Similar to Responsive web design (20)

Responsive Web Designed for your communication and marketing needs
Responsive Web Designed for your communication and marketing needsResponsive Web Designed for your communication and marketing needs
Responsive Web Designed for your communication and marketing needs
 
Aaug sample slides
Aaug sample slidesAaug sample slides
Aaug sample slides
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
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)
 
Media queries and frameworks
Media queries and frameworksMedia queries and frameworks
Media queries and frameworks
 
Advancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web DesignAdvancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web Design
 
Responsive Web Designs
Responsive Web DesignsResponsive Web Designs
Responsive Web Designs
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practices
 
Responding Responsively
Responding ResponsivelyResponding Responsively
Responding Responsively
 
Sbwire 531031
Sbwire 531031Sbwire 531031
Sbwire 531031
 
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake OilCSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
 
Responsive Development (ZendCon 2012)
Responsive Development (ZendCon 2012)Responsive Development (ZendCon 2012)
Responsive Development (ZendCon 2012)
 
S. Responsive Web Design
S. Responsive Web DesignS. Responsive Web Design
S. Responsive Web Design
 
Optimizing Sites for Mobile Devices
Optimizing Sites for Mobile DevicesOptimizing Sites for Mobile Devices
Optimizing Sites for Mobile Devices
 
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
 
Stc 2015 preparing legacy projects for responsive design - design issues
Stc 2015   preparing legacy projects for responsive design - design issuesStc 2015   preparing legacy projects for responsive design - design issues
Stc 2015 preparing legacy projects for responsive design - design issues
 
Responsive Web design Zambig
Responsive Web design ZambigResponsive Web design Zambig
Responsive Web design Zambig
 

Recently uploaded

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Recently uploaded (20)

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

Responsive web design

  • 1. Responsive web design FOR ZOMBIES… by zeeshan khan
  • 2. What is responsive web design? It’s not a single piece of technology, but rather, a set of techniques and ideas that form a effect which we term as “responsive”. Responsive design is an approach to web design that adjusts to the user, from varying browser sizes to changes in device.
  • 3. Features of a responsive design 1) Fluid 2) Flexible 3) Flowing 4) Device-agnostic 5) Optimised viewing
  • 4. Why do we need responsive UI? The spectrum of screen sizes and resolutions is widening every day, and creating a different version of an application that targets each individual device is not a practical way forward. This is the problem that responsive web design addresses head on.
  • 5. Why do we need responsive UI? It enables to design a single version of the application that would run in different devices and of browsers of different sizes and would adjust itself according to the viewport.
  • 7. Components of a responsive design 1) Fluid layout 2) Responsive images 3) Responsive fonts 4) CSS Media Queries
  • 8. Fluid layout Fluid grids go a few steps beyond the traditional liquid layout. Instead of designing a layout based on rigid pixels or arbitrary percentage values, a fluid grid is more carefully designed in terms of proportions.
  • 10. Fluid layout An ideal fluid layout : 1) Works in all major browsers 2) Shrinks to 780px. This accommodates users with 800x600 resolution, with no horizontal scroll! 3) Grows to 1260px. This accommodates users with 1280x768 resolution and everything in between. 4) This accommodates 90%+ of all internet users. You could easily make this layout grow larger, but be mindful of how line-length affects readability. Nobody wants to read a line of text 1980px long. 5) Sidebars are of "equal height" to the main content 6) Page content is centred for users with even higher resolutions.
  • 11. Responsive images Basic : Styling foreground images to adjust to the width of their container is very easy. img {max-width : 100 % } embed, object, video { max-width : 100 %} In most cases, that tiny style rule will do the trick! Once it’s in place, if the container around the image becomes narrower than the width of the image, then the image will scale down to match the width of its container. Setting the max-width to 100% also ensures that the image does not scale larger than its actual size, which would significantly reduce the image’s quality.
  • 12. Responsive images The performance problem : With the responsive image solution outlined above, all devices are fed the same images. Small icons and logos might not be too bad, but the problem compounds quickly as the images get larger and heftier. Retina images exacerbate the problem — you don’t want to send a big Retina image to a device that isn’t capable of displaying its full detail! Should we really be sending a 990 × 300-pixel 100 KB image meant for desktop viewers to a mobile phone?
  • 13. Responsive font Principles of responsive typography : 1) The typography should be of resizable type. That means type that not only resizes based on the size of the screen, but that is also resizable by the user. 2) The line lengths should be optimized, which maintain readability. That means for some screens, keeping the content area smaller and the line lengths shorter makes more sense, even though the content theoretically could stretch wider.
  • 14. Responsive font An example of responsive style in LESS : @media only screen and (max-width: 499px) { html { font-size: @basefont-size-singlecol-traditional + 1; &.BigFont { font-size: @basefont-size-singlecol-traditional + 7; } &.multicol { font-size: @basefont-size-multicol-traditional + 1; } } }
  • 15. Media queries CSS3 media queries basically allow you to gather data about the site visitor and use it to conditionally apply CSS styles. For our purposes, we’re primarily interested in the min- width media feature, which allows us to apply specific CSS styles if the browser window drops below a particular width that we can specify. In html … <link rel=“stylesheet” type=“text/css” media = “screen and (max-device-width : 480px)” href = “example.css” /> In CSS … @media screen and (max-device-width : 480px) {….} @import url(“example.css”) screen and (max-device-width : 480px);
  • 16. Media queries 320 pixels For small screen devices, like phones, held in portrait mode 480 pixels For small screen devices, like phones, held in landscape mode 600 pixels Smaller tablets, like the kindle (600x800) held in portrait mode 768 pixels Ten-inch tablets like the iPad(768x1024) held in portrait mode. 1024 pixels Tablets like the iPad held in landscape mode, as well as certain laptop, netbook. 1200 pixels For widescreen displays, primarily laptop and desktop browsers
  • 17. Media features 1) width 2) height 3) color 4) device-width 5) color-index 6) device-height 7) orientation 8) resolution 9) aspect-ratio
  • 18. Browser issues and compatibilty