Sophy Prak
Web Developer - Web Essentials
Member of KTUG(typo3cambodia.org)
Photo: http://goo.gl/Et5Py
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)
3
“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
14
“Responsive design will become even better as
we get tools, like Flexible Box and the Grid
Layout spec”
- Eric Meyer
15
Other sites
● http://css-tricks.com/
● http://webdesignerwall.com/
● For more http://mediaqueri.es/
22
Responsive Web Design
● Key Elements of Responsive Web Design
● Flexible Layout
● Flexible Images and Media
● Media Queries
23
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.
24
Flexible Images and Media
● Adjusting images according to the different screen widths or devices is
another important aspect of responsive web design
img,
embed,
video,
object{
max-width: 100%;
}
● Tutorial fluid image
1. http://unstoppablerobotninja.com/entry/fluid-images/
2. http://www.alistapart.com/articles/fluid-images/
25
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
26
Tips
● Meta viewport
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
● 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]-->
39
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)
40