SlideShare a Scribd company logo
Secrets of Responsive Web
Design
Formula for Fluid/ Responsive Layout




              by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast   1
It can be any device.




                                                                   Picture from internet


             by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast              2
Introduction
• Still developing websites for the standard screen resolution
  (1024x768)? Stop that! It makes you look foolish in the
  changing world of the Web.
• Responsive Web Design is like a shiny new toy for designers
  and developers. It is difficult to overestimate the importance
  of sensible design, as it ensures that any website will look
  good on different screen resolutions. I think everyone will
  agree with me that the first thing every designer worth his
  salt should do is get familiar with web design response.




                        by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast   3
Its called responsive design




                                                                   Picture from internet


             by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast              4
How to create a flexible grid
• Using a flexible, forget style fixed width and centered on the
  content. This means that all elements of our design is resized
  in correlation. The basic idea of a fluid grid to use this
  formula for the calculation of the percentage proportions of
  design.

target / context = result

.sidebar {
     width:31.5%;
}
                       by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast   5
Pixel to EM
• The same formula works for fonts. We stop using pixel sizes
  based on the time we use em or percentages.

14 pixels - the body font size;
21 pixels - the H1 font size;
21 ⁄ 14 = 1.5
Your CSS will look like:
h1 {
        font-size:1.5em;
}

                         by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast   6
Fluid images
• Using images of fluids causes the block size setting father. The
  main idea is to use unobvious properties {max-width: 100%}.
  An image with img {max-width: 100%} will never get out of
  your head unit. If the die block is less than the size of img then
  the image is reduced proportionally. This principle applies to
  images, objects and video.
• The usage of fluid images causes the adjustment of the size to
  the parent block. The main idea is in the unobvious usage of
  the properties of {max-width: 100%}. An image with img
  {max-width: 100%} will never come out from its parent unit. If
  the parent block is smaller than the size of img then the image
  is reduced proportionally. This principle applies to
  images,objects and video. Inaddition to that {display: block;} is
  used to avoid parent float issues. Keep in mind media query
  can be excuted only at latest browsers as it is part of CSS3.
                        by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast   7
Flexible images
• A better solution is to use context-aware image sizing. This
  technique basically consists of having different sizes of an
  image, and displaying only the size adapted to the device.
  Quick example:

<img src="image.jpg" data-src-600px="image-
600px.jpg" data-src-800px="image-800px.jpg"
alt=""> And the related CSS:

@media (min-device-width:600px) { img[data-src-
600px] { content: attr(data-src-600px, url); }
}

                        by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast   8
Should know about Media Queries
• Media inquiries are necessary in order to show the optimized
  layout for the very resolution, which at the time was surfed
  the site. It is a part of the CSS standard, which allows to apply
  styles based on information about the device resolution.

@media screen and (mas-width:980px){
     /*styles*/
}




                        by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast   9
Widespread pixel width
• The most widespread pixel widths are:
  320px(iPhone portrait, default),
  480px (iPhone landscape), 600px,
  768px(iPad portrait),
  900px, 1024px (iPad landscape).

• I strongly recommend to consider all these screen resolutions
  if you want to make your design a responsive one.




                       by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast   10
How does it look in practice?
• The first step we should do is to include a meta tag "viewport"
  into <head> to tell the browser that this webpage is optimized
  for mobile.

<meta name="viewport" content="width=device-
width, initial-scale=1.0">




                       by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast   11
jQuery is your friend
• jQuery is definitely a super useful tool when it comes to web
  development. Lots of jQuery plugins can help you to create
  better responsive websites.
  A quick round up of my personal favorites:
• FitText: A plugin that makes font-sizes flexible.
• Elastislide: A responsive jQuery carousel plugin.
• Supersized: A full screen background slideshow plugin.
• FitVids: A lightweight, easy-to-use jQuery plugin for fluid
  width video embeds.



                       by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast   12
Thank you




by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast   13
Author
Sameera Thilakasiri is a website designer based in Colombo. Specialist in UI,
UX, SEO, IA, IxD, RWD. He is blogging technical areas while is leisure. He can
be reached by http://www.sameerast.com




                             by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast   14

More Related Content

What's hot

Godfrey's propel one and capture
Godfrey's propel one and captureGodfrey's propel one and capture
Godfrey's propel one and capturevampmedia
 
WordPress SEO Essentials - by Peter Mead
WordPress SEO Essentials - by Peter MeadWordPress SEO Essentials - by Peter Mead
WordPress SEO Essentials - by Peter Mead
Peter Mead
 
Webinar Using Google Analytics(tm) to Build Your Content Strategy
Webinar  Using Google Analytics(tm) to Build Your Content StrategyWebinar  Using Google Analytics(tm) to Build Your Content Strategy
Webinar Using Google Analytics(tm) to Build Your Content Strategy
WP Engine
 
There's a Plugin for That: Benefits of Transitioning Your Blog or Site to Wor...
There's a Plugin for That: Benefits of Transitioning Your Blog or Site to Wor...There's a Plugin for That: Benefits of Transitioning Your Blog or Site to Wor...
There's a Plugin for That: Benefits of Transitioning Your Blog or Site to Wor...
BarkWorld Expo
 
Blogger to WordPress Migration
Blogger to WordPress MigrationBlogger to WordPress Migration
Blogger to WordPress Migration
New Tricks
 
Configuring WordPress - Dan Maby
Configuring WordPress - Dan MabyConfiguring WordPress - Dan Maby
Configuring WordPress - Dan Maby
Dan Maby
 
Issuemagazineplus Launched Bloggie Pro Personal Wordpress Blog Theme
Issuemagazineplus Launched Bloggie Pro Personal Wordpress Blog Theme Issuemagazineplus Launched Bloggie Pro Personal Wordpress Blog Theme
Issuemagazineplus Launched Bloggie Pro Personal Wordpress Blog Theme
issuemagazineplus
 
google amp pages
google amp pagesgoogle amp pages
Top reasons to design your website in word press | thoughtfulminds
Top reasons to design your website in word press | thoughtfulmindsTop reasons to design your website in word press | thoughtfulminds
Top reasons to design your website in word press | thoughtfulminds
Thoughtful Minds Web Services Pvt. Ltd,
 
Pagination and SEO - Making it Easy
Pagination and SEO - Making it EasyPagination and SEO - Making it Easy
Pagination and SEO - Making it Easy
Eric Enge
 
Plr high ticket
Plr high ticketPlr high ticket
Plr high ticket
sholatasar
 
Keeping Google Happy - May 18, 2017 Meetup
Keeping Google Happy - May 18, 2017 MeetupKeeping Google Happy - May 18, 2017 Meetup
Keeping Google Happy - May 18, 2017 Meetup
Mickey Mellen
 

What's hot (13)

Godfrey's propel one and capture
Godfrey's propel one and captureGodfrey's propel one and capture
Godfrey's propel one and capture
 
WordPress SEO Essentials - by Peter Mead
WordPress SEO Essentials - by Peter MeadWordPress SEO Essentials - by Peter Mead
WordPress SEO Essentials - by Peter Mead
 
Webinar Using Google Analytics(tm) to Build Your Content Strategy
Webinar  Using Google Analytics(tm) to Build Your Content StrategyWebinar  Using Google Analytics(tm) to Build Your Content Strategy
Webinar Using Google Analytics(tm) to Build Your Content Strategy
 
There's a Plugin for That: Benefits of Transitioning Your Blog or Site to Wor...
There's a Plugin for That: Benefits of Transitioning Your Blog or Site to Wor...There's a Plugin for That: Benefits of Transitioning Your Blog or Site to Wor...
There's a Plugin for That: Benefits of Transitioning Your Blog or Site to Wor...
 
Blogger to WordPress Migration
Blogger to WordPress MigrationBlogger to WordPress Migration
Blogger to WordPress Migration
 
Proposal of iEnglish
Proposal of iEnglishProposal of iEnglish
Proposal of iEnglish
 
Configuring WordPress - Dan Maby
Configuring WordPress - Dan MabyConfiguring WordPress - Dan Maby
Configuring WordPress - Dan Maby
 
Issuemagazineplus Launched Bloggie Pro Personal Wordpress Blog Theme
Issuemagazineplus Launched Bloggie Pro Personal Wordpress Blog Theme Issuemagazineplus Launched Bloggie Pro Personal Wordpress Blog Theme
Issuemagazineplus Launched Bloggie Pro Personal Wordpress Blog Theme
 
google amp pages
google amp pagesgoogle amp pages
google amp pages
 
Top reasons to design your website in word press | thoughtfulminds
Top reasons to design your website in word press | thoughtfulmindsTop reasons to design your website in word press | thoughtfulminds
Top reasons to design your website in word press | thoughtfulminds
 
Pagination and SEO - Making it Easy
Pagination and SEO - Making it EasyPagination and SEO - Making it Easy
Pagination and SEO - Making it Easy
 
Plr high ticket
Plr high ticketPlr high ticket
Plr high ticket
 
Keeping Google Happy - May 18, 2017 Meetup
Keeping Google Happy - May 18, 2017 MeetupKeeping Google Happy - May 18, 2017 Meetup
Keeping Google Happy - May 18, 2017 Meetup
 

Viewers also liked

Hottest trends to web design in 2013 by Sameera Thilakasiri
Hottest trends to web design in 2013 by Sameera ThilakasiriHottest trends to web design in 2013 by Sameera Thilakasiri
Hottest trends to web design in 2013 by Sameera Thilakasiri
Sameera Thilakasiri
 
Measuring and Improving Decision Quality
Measuring and Improving Decision QualityMeasuring and Improving Decision Quality
Measuring and Improving Decision Quality
Informed Medical Decisions Foundation
 
jQuery performance best practices by Sameera Thilakasiri
jQuery performance best practices by Sameera ThilakasirijQuery performance best practices by Sameera Thilakasiri
jQuery performance best practices by Sameera Thilakasiri
Sameera Thilakasiri
 
Google authorship - picture in search results by Sameera Thilakasiri
Google authorship - picture in search results by Sameera ThilakasiriGoogle authorship - picture in search results by Sameera Thilakasiri
Google authorship - picture in search results by Sameera Thilakasiri
Sameera Thilakasiri
 
La investigación pura
La investigación puraLa investigación pura
La investigación puramaryperez1991
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare
SlideShare
 
What to Upload to SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShare
SlideShare
 

Viewers also liked (7)

Hottest trends to web design in 2013 by Sameera Thilakasiri
Hottest trends to web design in 2013 by Sameera ThilakasiriHottest trends to web design in 2013 by Sameera Thilakasiri
Hottest trends to web design in 2013 by Sameera Thilakasiri
 
Measuring and Improving Decision Quality
Measuring and Improving Decision QualityMeasuring and Improving Decision Quality
Measuring and Improving Decision Quality
 
jQuery performance best practices by Sameera Thilakasiri
jQuery performance best practices by Sameera ThilakasirijQuery performance best practices by Sameera Thilakasiri
jQuery performance best practices by Sameera Thilakasiri
 
Google authorship - picture in search results by Sameera Thilakasiri
Google authorship - picture in search results by Sameera ThilakasiriGoogle authorship - picture in search results by Sameera Thilakasiri
Google authorship - picture in search results by Sameera Thilakasiri
 
La investigación pura
La investigación puraLa investigación pura
La investigación pura
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare
 
What to Upload to SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShare
 

Similar to Secrets of responsive web design by Sameera Thilakasiri

Responsive web design
Responsive web designResponsive web design
Responsive web design
Ben MacNeill
 
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!
Mediacurrent
 
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
Jj Jurgens
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
Zeeshan Khan
 
Design responsively
Design responsivelyDesign responsively
Design responsively
Célia Leocádio
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practices
mintersam
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
Julia Vi
 
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
Frédéric Harper
 
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
SEGIC
 
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
 
Responsive Web design Zambig
Responsive Web design ZambigResponsive Web design Zambig
Responsive Web design Zambig
Tribune Media
 
HTML and Responsive Design
HTML and Responsive Design HTML and Responsive Design
HTML and Responsive Design
Mindy McAdams
 
Aaug sample slides
Aaug sample slidesAaug sample slides
Aaug sample slides
Casandra Calo
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
Chiheb Chebbi
 
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
 
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
 
Advancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web DesignAdvancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web Design
Advancio
 
Why should we build our website responsive
Why should we build our website responsiveWhy should we build our website responsive
Why should we build our website responsiveOmkarsoft Bangalore
 
Responsive Design in iMIS Part 2
Responsive Design in iMIS Part 2Responsive Design in iMIS Part 2
Responsive Design in iMIS Part 2
Andrea Robertson
 

Similar to Secrets of responsive web design by Sameera Thilakasiri (20)

Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!
 
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
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Design responsively
Design responsivelyDesign responsively
Design responsively
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practices
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
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 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
 
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
 
Responsive Web design Zambig
Responsive Web design ZambigResponsive Web design Zambig
Responsive Web design Zambig
 
HTML and Responsive Design
HTML and Responsive Design HTML and Responsive Design
HTML and Responsive Design
 
Aaug sample slides
Aaug sample slidesAaug sample slides
Aaug sample slides
 
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)
 
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
 
Advancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web DesignAdvancio, Inc. Academy: Responsive Web Design
Advancio, Inc. Academy: Responsive Web Design
 
Why should we build our website responsive
Why should we build our website responsiveWhy should we build our website responsive
Why should we build our website responsive
 
Responsive Design in iMIS Part 2
Responsive Design in iMIS Part 2Responsive Design in iMIS Part 2
Responsive Design in iMIS Part 2
 

Recently uploaded

GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 

Recently uploaded (20)

GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 

Secrets of responsive web design by Sameera Thilakasiri

  • 1. Secrets of Responsive Web Design Formula for Fluid/ Responsive Layout by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 1
  • 2. It can be any device. Picture from internet by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 2
  • 3. Introduction • Still developing websites for the standard screen resolution (1024x768)? Stop that! It makes you look foolish in the changing world of the Web. • Responsive Web Design is like a shiny new toy for designers and developers. It is difficult to overestimate the importance of sensible design, as it ensures that any website will look good on different screen resolutions. I think everyone will agree with me that the first thing every designer worth his salt should do is get familiar with web design response. by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 3
  • 4. Its called responsive design Picture from internet by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 4
  • 5. How to create a flexible grid • Using a flexible, forget style fixed width and centered on the content. This means that all elements of our design is resized in correlation. The basic idea of a fluid grid to use this formula for the calculation of the percentage proportions of design. target / context = result .sidebar { width:31.5%; } by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 5
  • 6. Pixel to EM • The same formula works for fonts. We stop using pixel sizes based on the time we use em or percentages. 14 pixels - the body font size; 21 pixels - the H1 font size; 21 ⁄ 14 = 1.5 Your CSS will look like: h1 { font-size:1.5em; } by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 6
  • 7. Fluid images • Using images of fluids causes the block size setting father. The main idea is to use unobvious properties {max-width: 100%}. An image with img {max-width: 100%} will never get out of your head unit. If the die block is less than the size of img then the image is reduced proportionally. This principle applies to images, objects and video. • The usage of fluid images causes the adjustment of the size to the parent block. The main idea is in the unobvious usage of the properties of {max-width: 100%}. An image with img {max-width: 100%} will never come out from its parent unit. If the parent block is smaller than the size of img then the image is reduced proportionally. This principle applies to images,objects and video. Inaddition to that {display: block;} is used to avoid parent float issues. Keep in mind media query can be excuted only at latest browsers as it is part of CSS3. by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 7
  • 8. Flexible images • A better solution is to use context-aware image sizing. This technique basically consists of having different sizes of an image, and displaying only the size adapted to the device. Quick example: <img src="image.jpg" data-src-600px="image- 600px.jpg" data-src-800px="image-800px.jpg" alt=""> And the related CSS: @media (min-device-width:600px) { img[data-src- 600px] { content: attr(data-src-600px, url); } } by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 8
  • 9. Should know about Media Queries • Media inquiries are necessary in order to show the optimized layout for the very resolution, which at the time was surfed the site. It is a part of the CSS standard, which allows to apply styles based on information about the device resolution. @media screen and (mas-width:980px){ /*styles*/ } by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 9
  • 10. Widespread pixel width • The most widespread pixel widths are: 320px(iPhone portrait, default), 480px (iPhone landscape), 600px, 768px(iPad portrait), 900px, 1024px (iPad landscape). • I strongly recommend to consider all these screen resolutions if you want to make your design a responsive one. by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 10
  • 11. How does it look in practice? • The first step we should do is to include a meta tag "viewport" into <head> to tell the browser that this webpage is optimized for mobile. <meta name="viewport" content="width=device- width, initial-scale=1.0"> by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 11
  • 12. jQuery is your friend • jQuery is definitely a super useful tool when it comes to web development. Lots of jQuery plugins can help you to create better responsive websites. A quick round up of my personal favorites: • FitText: A plugin that makes font-sizes flexible. • Elastislide: A responsive jQuery carousel plugin. • Supersized: A full screen background slideshow plugin. • FitVids: A lightweight, easy-to-use jQuery plugin for fluid width video embeds. by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 12
  • 13. Thank you by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 13
  • 14. Author Sameera Thilakasiri is a website designer based in Colombo. Specialist in UI, UX, SEO, IA, IxD, RWD. He is blogging technical areas while is leisure. He can be reached by http://www.sameerast.com by Sameera Thilakasiri | www.sameerast.com | Twitter @ sameerast 14