responsive and adaptive web design

Post on 25-Feb-2016

28 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

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

Responsive and Adaptive Web Design

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

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…

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

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;

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

Your first Responsive design…

The goal:

Standard screen-sizes

1,024 pixels and above (Desktops and Laptops)

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

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…

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.

MEDIA QUERIES IN ACTION…

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

Navigation Options

What about my static top navigation width?

Demo…

top related