Transcript
Page 1: Responsive Design in WordPress

OMGanother

ResponsiveDESIGN

just

talk

Page 2: Responsive Design in WordPress

BACKSTORYthe

Page 4: Responsive Design in WordPress

What We DoThemesPluginsHosting

EducationSupport

Page 5: Responsive Design in WordPress

2004let’s rewind

Page 6: Responsive Design in WordPress

2007fast forward

Page 7: Responsive Design in WordPress

VISUALIZATIONfree WordPress theme

Page 8: Responsive Design in WordPress

JOBStwo full-time

Page 9: Responsive Design in WordPress

NO LIFEI had

Page 10: Responsive Design in WordPress

I QUIT.so

Page 11: Responsive Design in WordPress

STARTEDthat’s when things

Page 12: Responsive Design in WordPress

EXAMPLESa few

Page 14: Responsive Design in WordPress
Page 15: Responsive Design in WordPress
Page 16: Responsive Design in WordPress
Page 18: Responsive Design in WordPress

FUNDAMENTALSthree

Page 19: Responsive Design in WordPress

1Flexible Grid

Page 20: Responsive Design in WordPress

700 / 1000 = .70 (70%)

700px

1000px

300px

(70%) (30%)

(100%)

Page 21: Responsive Design in WordPress

target / context = result

Page 22: Responsive Design in WordPress

Fluid or Fixed Width?fluid fixed

•scales horizontally•fits all screen sizes•use width: 100%

•scales to 1000px•fits all screen sizes but stops at 1000px•use max-width: 1000px

Page 23: Responsive Design in WordPress

AUDIENCEknow your

Page 24: Responsive Design in WordPress

2FlexibleImages&

Media

Page 25: Responsive Design in WordPress

img { max-width: 100%; height: auto;}

Page 26: Responsive Design in WordPress

img { } img { max-width: 100% }

blowout! woot!

Page 27: Responsive Design in WordPress

VIDEOS & EMBEDSresponsive

Page 28: Responsive Design in WordPress

video,embed,iframe { max-width: 100%; height: auto;}

Page 29: Responsive Design in WordPress

3Media Queries

Page 30: Responsive Design in WordPress

HUH?

Page 31: Responsive Design in WordPress

Media Queries in CSS3 looks at the capability of the device loading a webpage and checks for:

★Width and height (of the browser window)★Device width and height★Orientation – ( landscape or portrait)★Resolution

If the user has a browser that supports media queries then we can write CSS specifically for certain situations.

Page 32: Responsive Design in WordPress

@media screenand (max-width: 850px) { body { background: red }}

Page 33: Responsive Design in WordPress

Added to bottom of stylesheet (style.css)

Page 34: Responsive Design in WordPress

@media only screenand (min-device-width : 320px)and (max-device-width : 480px) {/* Styles */}

Page 35: Responsive Design in WordPress

#primary, #secondary { width:100%; float: none; margin: 2em 0 0;}

Page 37: Responsive Design in WordPress

ALL TOGETHERnow

Page 38: Responsive Design in WordPress

NAVIGATIONresponsive

Page 39: Responsive Design in WordPress

MENU HELLwelcome to

Page 40: Responsive Design in WordPress

MENU HELL TO DROPDOWN

Page 41: Responsive Design in WordPress

Convert Menu to a dropdown for small

screens

http://css-tricks.com/convert-menu-to-dropdown/

Page 42: Responsive Design in WordPress
Page 43: Responsive Design in WordPress
Page 44: Responsive Design in WordPress

BACKGROUNDSresponsive

Page 45: Responsive Design in WordPress

background-size: 100% auto;

Page 46: Responsive Design in WordPress

large screens

max-width: 850px with no background-size: 100% auto;

max-width: 850px with background-size: 100% auto;

Page 47: Responsive Design in WordPress

RETINAdisplay

Page 48: Responsive Design in WordPress

Retina Display has 4 times the number of pixels than previous

iPhones and many other smart phone

screens currently on the market.

Page 49: Responsive Design in WordPress
Page 50: Responsive Design in WordPress

1. Make two versions of the image2. Increase the second by 200%3. Define your CSS4. Use Media Queries to swap high-res image

Page 51: Responsive Design in WordPress

@media screen and (-webkit-min-device-pixel-ratio: 1.5) { .i { background: url(images/pic-2x.png); background-size:64px 12px; }}

Page 52: Responsive Design in WordPress

SERVER SIDEwhat about

mobile detection

Page 53: Responsive Design in WordPress

$is_iphone

Page 54: Responsive Design in WordPress
Page 55: Responsive Design in WordPress

$is_mobile

http://wordpress.org/extend/plugins/mobile-detector/

Page 56: Responsive Design in WordPress
Page 57: Responsive Design in WordPress

wp_is_mobile()

more core support for mobile in 3.4 & 3.5

Page 58: Responsive Design in WordPress

TOOLSsweet

Page 59: Responsive Design in WordPress

iOS Simulator+

iWebInspector

Page 60: Responsive Design in WordPress

RESPONSIVE SITE CHECKER

http://mattkersley.com/responsive/

Page 61: Responsive Design in WordPress

go forth and do

@[email protected]

GraphPaperPress.com


Recommended