responsive and adaptive web design

12
Responsive and Adaptive Web Design By: Chad W. Stoker (MCTS, MCP, MCAD) President & Chief Technology Officer

Upload: spiro

Post on 25-Feb-2016

30 views

Category:

Documents


0 download

DESCRIPTION

Responsive and Adaptive Web Design. By: Chad W. Stoker (MCTS, MCP, MCAD) President & Chief Technology Officer. Responsive Web Design means what??? Hardware form factors… Re-thinking web layout… As always, balance between existing skill-sets and project priorities…. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Responsive and Adaptive Web Design

Responsive and Adaptive Web Design

By: Chad W. Stoker (MCTS, MCP, MCAD)President & Chief Technology Officer

Page 2: Responsive and Adaptive Web Design

Responsive Web Design intro

Responsive Web Design means what???◦Hardware form factors…◦Re-thinking web layout…◦As always, balance between

existing skill-sets and project priorities…

Page 3: Responsive and Adaptive Web Design

Tools

HTML5 – This should be the new target for all of your web development. Think about how to achieve this with ASP.NET versus ASP.NET MVC.

Fluid GridsFluid ImagesMedia Queries CSS3Javascript

Page 4: Responsive and Adaptive Web Design

Pre-requisites (1)

Modernizrhttp://www.modernizr.com/ Example:

◦if (Modernizr.canvas) {◦ // let's draw some shapes!◦} else {◦ // no native canvas support available :(◦}

W/O Modernizr : return !!document.createElement('canvas').getContext;

Page 5: Responsive and Adaptive Web Design

Pre-requisites (2)

HTML5 shim for IE… (http://code.google.com/p/html5shiv/)◦ <!--[if lt IE 9]> <script

src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->

CSS3 Media Queries Shim… (http://code.google.com/p/css3-mediaqueries-js/)◦ <!--[if lt IE 9]> <script src="http://css3-mediaqueries-

js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script> <![endif]-->

◦ Note: Doesn't work on @import'ed stylesheets (which you shouldn't use anyway for performance reasons). Also won't listen to the media attribute of the <link> and <style> elements

Page 6: Responsive and Adaptive Web Design

Your first Responsive design…

The goal:

Page 7: Responsive and Adaptive Web Design

Standard screen-sizes

1,024 pixels and above (Desktops and Laptops)

Between 1,024 and 700 pixels (tablets)700 pixels and below (phones)

Page 8: Responsive and Adaptive Web Design

Starting out easy

1. Using the “float” CSS attribute2. Remembering your HTML5 tags3. Remembering your backward-

compatibility issues4. Keeping it to just 2 columns max 5. Keeping the content to simple text that

wraps.6. Float settings…

Page 9: Responsive and Adaptive Web Design

Making it a bit more tricky…

Identifying where a “Fluid Grid” can be constructed.Calculating width…Demonstrate how Border, padding, margins, etc affect the wrapping behavior.

Page 10: Responsive and Adaptive Web Design

MEDIA QUERIES IN ACTION…

Now we’ve got something…◦Welcome - @media CSS!

Page 11: Responsive and Adaptive Web Design

Navigation Options

What about my static top navigation width?

Demo…