responsive web design on student's day

41
Responsive Web Design by Sophy Prak

Upload: psophy

Post on 13-Jan-2015

726 views

Category:

Education


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Responsive Web Design On Student's day

Responsive Web Designby Sophy Prak

Page 2: Responsive Web Design On Student's day

Sophy PrakWeb Developer - Web Essentials

Member of KTUG(typo3cambodia.org)

Photo: http://goo.gl/Et5Py

Page 3: Responsive Web Design On Student's day

3

Introduction

● May 25th, 2010 Ethan Marcotte has wrote article “Responsive Web Design” (http://goo.gl/BLQMe)

● Jun 18, 2010 SIMON COLLISON updated his blog with media queries(colly.com)

Page 4: Responsive Web Design On Student's day

4

Page 5: Responsive Web Design On Student's day

5

Adaptive(Multiple Fixed Width Layouts)

or

Responsive(Multiple Fluid Grid Layouts)

Page 6: Responsive Web Design On Student's day

6

Mixed ApproachFixed width for large and medium

Fluid width for small

Page 7: Responsive Web Design On Student's day

7

Why do we use Responsive Web Design?

Page 8: Responsive Web Design On Student's day

8

Should we create sub-domain and design layout for each

devices?

Page 9: Responsive Web Design On Student's day

9

Page 10: Responsive Web Design On Student's day

10

Page 11: Responsive Web Design On Student's day

11

Page 12: Responsive Web Design On Student's day

12

Page 13: Responsive Web Design On Student's day

13

Answer

NO!

Page 14: Responsive Web Design On Student's day

14

“Day by day, the number of devices, platforms, and browsers that need to work with your site grows. Responsive web design represents a fundamental shift in how we’ll build websites for the decade to come.”

- Jeffrey Veen

Page 15: Responsive Web Design On Student's day

15

“Responsive design will become even better as we get tools, like Flexible Box and the Grid Layout spec”

- Eric Meyer

Page 16: Responsive Web Design On Student's day

16

One site for every screen

- John Polacek

Page 17: Responsive Web Design On Student's day

17

Who is using it?

Page 18: Responsive Web Design On Student's day

18

london.msn.co.uk

http://www.barackobama.com/

Page 19: Responsive Web Design On Student's day

19

www.barackobama.com

http://www.barackobama.com/

Page 20: Responsive Web Design On Student's day

20

www.smashingmagazine.com

http://www.smashingmagazine.com/

Page 21: Responsive Web Design On Student's day

21

www.bostonglobe.com

http://www.bostonglobe.com

Page 22: Responsive Web Design On Student's day

22

Other sites

● http://css-tricks.com/

● http://webdesignerwall.com/

● For more http://mediaqueri.es/

Page 23: Responsive Web Design On Student's day

23

Responsive Web Design

● Key Elements of Responsive Web Design

● Flexible Layout

● Flexible Images and Media

● Media Queries

Page 24: Responsive Web Design On Student's day

24

Flexible Layout

First step considered for responsive design is flexible layout. As the browser width changes, fluid grids will resize and reposition the content as necessary.

Page 25: Responsive Web Design On Student's day

25

Flexible Images and Media

● Adjusting images according to the different screen widths or devices is another important aspect of responsive web design

● Tutorial fluid image

1. http://unstoppablerobotninja.com/entry/fluid-images/

2. http://www.alistapart.com/articles/fluid-images/

img,embed,video,object{ max-width: 100%;}

Page 26: Responsive Web Design On Student's day

26

Media Queries

● In CSS2 you was able to apply specific stylesheet for specify media type like screen or print.

● In CSS3, W3C made it more efficient by adding media queries made it as part of the CSS3 specification

Page 27: Responsive Web Design On Student's day

27

How we use media queries?

Page 28: Responsive Web Design On Student's day

28

Media Queries Conditions

/* Landscape phones and down */ @media (max-width: 480px) { ... } /* Landscape phone to portrait tablet */ @media (max-width: 767px) { ... } /* Portrait tablet to landscape and desktop */ @media (min-width: 768px) and (max-width: 979px) { ... } /* Large desktop */ @media (min-width: 1200px) { ... }

Source of Twitter Bootstrap

Page 29: Responsive Web Design On Student's day

29

/* Landscape phones and down */@media (max-width: 480px) { ... }

Page 30: Responsive Web Design On Student's day

30

/* Landscape phone to portrait tablet */ @media (max-width: 767px) { ... }

Page 31: Responsive Web Design On Student's day

31

/* Portrait tablet to landscape and desktop */ @media (min-width: 768px) and (max-width: 979px) { ... }

Page 32: Responsive Web Design On Student's day

32

/* Large desktop */ @media (min-width: 1200px) { ... }

Page 33: Responsive Web Design On Student's day

33

Frameworks(save time)

or

Roll Your Own(more control)

Page 34: Responsive Web Design On Student's day

34

Framework for Responsive Web Design

Page 35: Responsive Web Design On Student's day

35

Bootstrap, from Twitter

● Simple, fluid HTML/CSS/JS framework from Twitter

● http://twitter.github.com/bootstrap/

Page 36: Responsive Web Design On Student's day

36

Foundation

● The most advanced responsive front-end framework in the world.

● http://foundation.zurb.com/

Page 37: Responsive Web Design On Student's day

37

1140 CSS GRID

● The 1140 grid fits perfectly into a 1280 monitor...

● http://cssgrid.net/

Page 38: Responsive Web Design On Student's day

38

Other frameworks

● http://stuffandnonsense.co.uk/projects/320andup/

● http://framelessgrid.com/

● http://lessframework.com/

● http://www.amazium.co.uk/

Page 39: Responsive Web Design On Student's day

39

Tips

● Meta viewport

● Use css3-mediaqueries.js for IE8 or older

<!--[if lt IE 9]>

<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>

<![endif]-->

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

<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />

Page 40: Responsive Web Design On Student's day

40

References

● Responsive Web Design (http://goo.gl/BLQMe)

● Designing for a Responsive Web (http://goo.gl/iK6dO)

● Fluid Image (http://goo.gl/RvQlO)

● More responsive tutorials (http://goo.gl/G75ov)

● What the hack is Responsive Web Design(http://goo.gl/kUod7)

Page 41: Responsive Web Design On Student's day

41

Q&A

Contact me:[email protected]

@sophyhttp://kooms.info