This two hour webinar will focus on the fundamentals of responsive design including why is it important, how it can be leveraged on existing sites, how new sites can be designed with responsiveness in mind, and how CSS media queries are used to make it all happen.
##Why is responsive design important?
In the beginning, web designers only had to worry about a single platform for their sites - desktop browsers. Soon, smart phones hit the scene and many sites opted to have a (sometimes completely) separate mobile site. Now, with the explosion of devices of all sizes, what are we to do? Create a separate site for each device? The solution that makes the most sense is "responsive design" - design a single site that can adapt to virtually any device size. The responsive design of the site then automatically adjusts itself based on the device width.
Most responsive web sites are built on a "fluid grid" that is based on percentage widths, instead of absolute pixel widths (the days of pixel-perfect web design are long gone!)
##Fundamental concepts
"One" example attached below. Start by making a copy of one_start.html (name it one.html) and working off of the copy. Go through each section below and uncomment relevant code in one.html.
###Fluid Grid
* Utilize percentage widths, not pixel widths for HTML layout grid elements
* Utilize the "max-width" CSS property
* Calculate percentage widths with: target ÷ context = result
###Image widths
* Have images fill up their container, then set their width to 100% (and height to "auto", if necessary).
###Media queries
"Media Queries is a CSS3 module allowing content rendering to adapt to conditions such as screen resolution (e.g. smartphone vs. high definition screen)." _via Wikipedia, see link below_
@media screen and (max-width: 590px) {
...css in here...
}
Support for media queries is surprisingly quite strong across all modern browsers. Support for older versions of browsers is available via various workarounds, but is often not necessary as modern non-desktop devices have web browsers that support media queries (iOS, Android, Kindle, etc...)
###Viewport Metatag
Instructs mobile devices (iOS devices, in particular) to not use their default behavior of attempting shrink the full desktop site for display. Using this tag allows all the media query goodness to actually work on small displays.
###Floats
* For narrow widths, remove floated layout elements with "float: none;" declarations inside media queries.
##How can responsive design be leveraged on existing sites?
"NEFLIN" example attached below. Edit the build.css file, at the bottom of the file are commented out CSS rules that we can uncomment to start making the site responsive.
1. Translate layout into a fluid grid, using percentages (or _ems_) for horizontal widths, margins, and padding.
2. Watch out for fixed height elements!
3. Make images stretchy.
4. Add media queries to remove floats.
5. Add the viewport meta tag.
##How can new sites be designed with responsiveness in mind?
###Mobile first
Design for mobile first, then scale up.
###Navigation
Consider navigation elements carefully, they are often the trickiest things to handle in responsive design. For example:
* [Techwell](http://www.techwell.com/)
* [World Wildlife Fund](http://worldwildlife.org/)
* [Time magazine](http://www.time.com/time/)
* [University of California, San Diego](http://ucsd.edu/)
* [Canton Public Library](http://www.cantonpl.org/)
##Resources
* [This is Responsive](http://bradfrost.github.io/this-is-responsive/index.html) - great resource for responsive design patterns (examples), resources, and news.
* [Responsive design is Google's recommended configuration for smart-phone optimized web sites](https://developers.google.com/webmasters/smartphone-sites/details)
* [Viewport meta tag](http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/quick-tip-dont-forget-the-viewport-meta-tag/)
* [Responsive Web Design](http://alistapart.com/article/responsive-web-design) article by Ethan Marcotte
* [Fluid Grid](http://alistapart.com/article/fluidgrids) article by Ethan Marcotte
* [Mobile First](http://www.lukew.com/resources/mobile_first.asp) book by Luke Wroblewski
* [Mobile First!](http://www.lukew.com/ff/entry.asp?1239) presentation by Luke Wroblewski
* [Responsinator](http://www.responsinator.com/) - see how a site looks on different devices
* [25 jQuery Plugins to Help with Responsive Layouts](http://speckyboy.com/2011/10/24/25-jquery-plugins-to-help-with-responsive-layouts/)
* [Scalable Navigation Patterns in Responsive Web Design](http://www.palantir.net/blog/scalable-navigation-patterns-responsive-web-design)
* [Media Queries](http://mediaqueri.es/) - shows how sites handle responsive design - loads of examples!
* [Wikipedia's Media Queries page](http://en.wikipedia.org/wiki/Media_queries)
* [Chart of web browser media queries support](http://caniuse.com/css-mediaqueries)
* [High resolution displays](http://menacingcloud.com/?c=highPixelDensityDisplays)
* [Adaptive Image](http://adaptive-images.com/) - information about using adaptive images on your web site
* [A Common Set of Breakpoints to Start](http://alwaystwisted.com/post.php?s=2012-04-28-a-common-set-of-breakpoints-to-start) blog post by Always Twisted.
* [Chrome DevTools for Mobile: Screencast and Emulation](http://www.html5rocks.com/en/tutorials/developertools/mobile/) blog post.
* [CSS Media Queries & Using Available Space](http://css-tricks.com/css-media-queries/)