You are on page 1of 529

RESPONSIVE WEB DESIGN

FASHIONABLY FLEXIBLE
Andy(Clarke
1.4
My book
Available in paperback
and e-book formats
hardboiledwebdesign.com
John Allsopp, Mark Boulton, Brad Frost, Jeremy Keith,
Ethan Marcotte, Brian and Stephanie Rieger,
Luke Wroblewski and all the designers and developers
whose work Ive featured.
My special thanks to:
1
2
3
4
Becoming responsive
Responsive design process
Responsive design patterns
Technically speaking
Navigation linearised
Rolling up all navigation
into a grid of icons is a
nice touch
Collapsing navigation into
a drop-down interface
Javascript converts
unordered list into a
select menu.
Reflowing of branding
and navigation
Ooops. The Boston Globe
has lost its position at the
top of the visual
hierarchy
1
Part
FASHIONABLY FLEXIBLE RESPONSIVE WEB DESIGN
John Allsopp
The control which designers know in the print medium,
and often desire in the web medium, is simply a function
of the limitation of the printed page. We should embrace
the fact that the web doesnt have the same constraints,
and design for this flexibility.
http://www.alistapart.com/articles/dao
2000
04
2009
03
The Dao Of Web Design
(A List Apart) John Allsopp
Fluid Grids
Ethan Marcotte
iPhone
2007
01
iPod Touch
2007
07
RESPONSIVE WEB DESIGN TIMELINE
2000
04
2009
03
2009
11
The Dao Of Web Design
(A List Apart) John Allsopp
Fluid Grids
Ethan Marcotte
Mobile First
Luke Wroblewski
iPhone
2007
01
iPod Touch
2007
07 01
2007
2000
04
2009
03
2009
11
The Dao Of Web Design
(A List Apart) John Allsopp
Fluid Grids
Ethan Marcotte
Mobile First
Luke Wroblewski
iPhone
2007
01
iPod Touch
2007
07 07
2007
2000
04
2009
11
The Dao Of Web Design
(A List Apart) John Allsopp
Fluid Grids
Ethan Marcotte
Mobile First
Luke Wroblewski
iPhone
2007
01
iPod Touch
2007
07
2009
03 03
2009
iPad
2010
04
2009
03
2009
11
2010
05
Fluid Grids
Ethan Marcotte
Mobile First
Luke Wroblewski
Responsive Web Design
Ethan Marcotte
iPhone
2007
01
iPod Touch
2007
07 11
2009
iPad
2010
04
2009
03
2010
05
Fluid Grids
Ethan Marcotte
Mobile First
Luke Wroblewski
Responsive Web Design
Ethan Marcotte
One Web
Jeremy Keith
2010
12
iPad
2009
11
2009
11 04
2010
2009
03
Mobile First
Luke Wroblewski
Responsive Web Design
Ethan Marcotte
One Web
Jeremy Keith
320 and Up
iPad
2010
04
2010
11
2009
11 05
2010 2011
04
2010
04
2010
05
Responsive Web Design
Ethan Marcotte
One Web
Jeremy Keith
Responsive Web Design
(book)
320 and Up
2011
04 11
2010 2011
06
iPad
2010
05
Responsive Web Design
Ethan Marcotte
One Web
Jeremy Keith
There Is No Mobile Web
Jeremy Keith
Responsive Web Design
(book)
320 and Up
2011
04 04
2011 2011
06
2010
11
2011
09
One Web
Jeremy Keith
There Is No Mobile Web
Jeremy Keith
Responsive Web Design
(book)
320 and Up The Boston Globe
2011
04 06
2011 2010
11
2011
09
2011
09
There Is No Mobile Web
Jeremy Keith
Responsive Web Design
(book)
320 and Up The Boston Globe
2011
04
2011
09
2011
06 09
2011
There Is No Mobile Web
Jeremy Keith
Responsive Web Design
(book)
The Boston Globe
2011
09
2011
06 09
2011
Total annual global shipments of smart phones
exceeded those of client PCs (including pads) for
the rst time in 2011
158.5 million smartphones in Q4 2011
120.2 million PCs in Q4 2011
488 million smartphones
415 million PCs
Smartphones overtake PCs 2011
http://www.canalys.com/newsroom/smart-phones-overtake-client-pcs-2011
13.2% of the worlds 6.1 billion
cellphones are smartphones. 30% in the
Germany, UK and United States. Over
50% in Sweden and Finland
55% of Twitters trafc comes from
mobile devices
33% of Facebook updates come from
mobile devices
SMARTPHONES
Source: http://lukew.com/ff/entry.asp?1450
http://venturebeat.com/2012/01/10/paypals-mobile-payments-4b-2011/
Mobile payments
$141M
$750M
$4B
2009
2010
2011
1 iPhone accounts for the mobile trafc
of 30 feature phones
iOS accounts for 54.65% of mobile
browsing. Android has 16.26% and
RIM 3.29%
75% of Googles mobile search comes from
iOS devices
70% of eBays mobile e-commerce business
in the United States came from iPhone
IPHONES
Source: http://lukew.com/ff/entry.asp?1415
Amazon now sells more Kindle books
than all print books (hardcover and
paperback) combined
Amazon customers purchased over 1
million Kindle devices each week of the
2011 Christmas period
E-READERS
Source: http://lukew.com/ff/entry.asp?1391
The share e-book reader owners in the
USA jumped from 10% to 19% between
mid-December and early January.
Kindle Fire has become the best-selling,
most-gifted and most-wished-for product
on Amazon.
Gifting of Kindle books up 175% between
this Black Friday and Christmas Day
compared to the same period in 2010.
The #1 and #4 best-selling Kindle books
released in 2011 were published using
Kindle Direct Publishing.
KINDLE SALES
Source: http://www.lukew.com/ff/entry.asp?1488
100 million books downloaded from
Apples iBooks in less than 12 months
Nearly 7 percent of all online purchases
were made using iPads
iPad and iPhone shoppers account for
90% of all mobile purchases and spend
19% more per order than Android users
TABLETS IPADS
Source: http://lukew.com/ff/entry.asp?1478
Ethan Marcotte
Rather than tailoring disconnected designs to each of an
ever-increasing number of web devices, we can treat
them as facets of the same experience. We can design for
an optimal viewing experience, but embed standards-
based technologies into our designs to make them not
only more flexible, but more adaptive to the media that
renders them.
http://alistapart.com/articles/responsive-web-design
A exible grid
Flexible images and media
CSS3 media queries
Three responsive ingredients
Andy Clarke
Anything thats fixed and unresponsive isnt web design
anymore, its something else. If you dont embrace the
inherent fluidity of the web, youre not a web designer,
youre something else. Web design is responsive design.
Responsive Web Design is web design, done right.
http://the-pastry-box-project.net/andy-clarke/2012-january-3/
Luke Jones
That Andy Clarke (@Malarkey) is such a massive cock.
http://www.the-pastry-box-project.net/ what if a client
say No, don't make it responsive.
https://twitter.com/lukejonesme/status/154142315915640832
@lukejonesme
Different skills and workow may be required
More time spent at beginning of the process
Additional resources may be required
Deciding when responsive
is appropriate
Ben Callahan
We do responsive web design, but we dont do it for the
sake of being trendy. We do it because we believe its the
way websites should be made. This is an opportunity for
us to finally embrace the dynamic medium we build for.
The web is not fixed width.
http://seesparkbox.com/foundry/you_say_responsive_i_say_adaptive
Donald Rumsfeld
There are known knowns; these are the things that we know.
There are known unknowns; these are the things that we know
we dont know. But there are also the unknown unknowns;
these are the things we dont know we dont know.
Hat tip to Jeremy Keith
640x480
Letterbox framesets. Can you believe we did that stuff?
Letterbox framesets. Can you believe we did that stuff?
Letterbox framesets. Can you believe we did that stuff?
800x600
1024x768
Jason Santa Maria
ALA has always tried to be one of those sites at the front of the
pack. We dont support 800 x 600 anymore, nor do we 640 x 480.
Do you? People flipped when sites stopped supporting 640 x
480 now no one says a word. Things change. Trust me, you are
going to see more sites stretching out their legs and putting their
feet up.
http://stuffandnonsense.co.uk/blog/about/a_list_taken_apart
320x480
320x420
420x320
Mat Wilto Marquis
<link rel="stylesheet" media="only screen and (max-
device-width: 480px)" href="/css/iphone.css"> No, you
guys. No.
http://twitter.com/wilto/status/116589243777814528
@wilto
Arguing about 640, 800 or 1024 pixels is like arguing about
whether Pepsi tastes better than Coke when really, a nice
glass of water would be much more refreshing. The numbers
game is a red herring. A big fixed-width red herring.
http://stuffandnonsense.co.uk/blog/about/a_list_taken_apart
Jeremy Keith
340x480
340x480 640x480
8
0
0
x
1
2
0
0
720x1280
640X960
800x1280
On the web there are no edges
Tools reinforce notions
such as the canvas
Jason Santa Maria
The framework for what a page is has changed considerably even
in the past few years, though our applications for designing those
frameworks are still stuck in the web of yore, and largely dictated
by their use for print design.
http://v4.jasonsantamaria.com/articles/a-real-web-design-application
Design isnt just about layout
Layout
Elements placed on a grid, horizontally and vertically
Typography
Typefaces, type treatments and white space
Colour
Emotion and interaction vocabulary
Texture
Decorative elements, line-work, patterns and shapes
Trent Walton
Web designers will have to look beyond the layout in front
of them to envision how its elements will reflow & lockup
at various widths while maintaining form & hierarchy.
http://trentwalton.com/2011/07/14/content-choreography
[Style tiles]
Design atmosphere
Typography
Typefaces, type treatments and white space
Colour
Emotion and interaction vocabulary
Texture
Decorative elements, line-work, patterns and shapes
FRV BRAND GUIDELINES ES
25
MASS: TYPOGRAPHY
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
The Product Name should appear in Futura Std Bold Uppercase. This sans serif font has been chosen for its clarity, legibility and classic appeal.
The Front Product Descriptor copy should appear in ITC Century Std Lowercase. This serif font has been chosen for its simple style and
clarity even in smaller point sizes.
The back of pack copy should appear in Futura Std. This sans serif font has been chosen for its simple style and clarity even in smaller
point sizes.
All fonts are OpenType from the Adobe Font Folio 11. (www.adobe.com/uk/products/fontfolio)
17
MASS
PANTONE
7489 C
PANTONE
7495 C
PANTONE
366 C
PANTONE
383 C
PANTONE
7406 C
PANTONE
121 C
PANTONE
1235 C
PANTONE
7502 C
PANTONE
157 C
PANTONE
138 C
PANTONE
166 C
PANTONE
Warm Red C
PANTONE
485 C
PANTONE
184 C
PANTONE
5005 C
PANTONE
7431 C
PANTONE
673 C
PANTONE
701 C
PANTONE
529 C
PANTONE
7446 C
PANTONE
659 C
PANTONE
7459 C
PANTONE
278 C
PANTONE
551 C
PANTONE
629 C
PANTONE
3105 C
PANTONE
3248 C
PANTONE
7466 C
PANTONE
7536 C
PANTONE
7530 C
OUTDOOR
PANTONE
583 C
PANTONE
291 C
MASS
:
COLOUR PALETTE
Mass products are made up of a warm colourful palette that is both complementary and contrasting.
Colour is a key element of this design, therefore it is important that Pantone colours are used to print the designs rather than CMYK.
Pantone colours will provide the maximum amount of consistency across the Product Range. In instances where this is not possible
we have created optimised CMYK values that are shown on page 18. In the instance that a suitable colour does not exist for a Mass
Food product, please contact your Licensing Manager.
22
MASS: PHOTOGRAPHY
Always use image in monochrome
with a background colour wash
Never use in colour Never use simply as black and
white image
Never position anywhere other
than bottom right
Never cover with copy
ITALIAN FUSILLI
enjoy traditional
texture with Durum
Wheat Semolina
Never force the image into the
given space leave an area of
blank space round the image
Never position the image around
a corner
dos and donts
G
E
L

S
t
y
|
e
g
u
|
d
e


V
e
r
s
|
o
n

0
2


[


O
c
t
o
b
e
r

2
0
1
1
Bu||d|ng a
G|oba| Exper|ence Language
for the BBC
GEL Sty|egu|de

G
E
L

S
t
y
|
e
g
u
|
d
e


V
e
r
s
|
o
n

0
2


[


O
c
t
o
b
e
r

2
0
1
1
UX&D 25
G
E
L

S
t
y
|
e
g
u
|
d
e


V
e
r
s
|
o
n

0
2


[


O
c
t
o
b
e
r

2
0
1
1
Arial Regular
ABCDEFGHJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
1234567890!@$%^&*()_+
AriaI BoId
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijkImnopqrstuvwxyz
1234567890!@$%^&*()_+
Glll Sans Regular
A8CDLFGH|[KLMNOPQRSTUvWXYZ
abcoetgbljklmnopqrstuvwyz
1234567890!@L$^&*()_+
GEL uses bo|d typography to create stronger
h|erarch|es and drama across the s|te. We're mov|ng
from Verdana to Ar|a| as the BBC's defau|t web font for
both headers and body copy.
03 Bu||d|ng B|ocks Typography
26
G
E
L

S
t
y
|
e
g
u
|
d
e


V
e
r
s
|
o
n

0
2


[


O
c
t
o
b
e
r

2
0
1
1
03 Bu||d|ng B|ocks Typography
Large bo|d type shou|d be used to estab||sh
a c|ear |nformat|on h|erarchy. These are the
recommended type s|zes.
AriaI BoId 48px
48px Leading / -40 Tracking Dev PixeI Spec: -2px Letter spacing
AriaI BoId 36px
36px Leading / -30 Tracking Dev PixeI Spec: -1px Letter spacing
AriaI BoId 32px
32px Leading / -30 Tracking Dev PixeI Spec: -1px Letter spacing
AriaI BoId 28px
28px Leading / -36 Tracking Dev PixeI Spec: -1px Letter spacing
AriaI BoId 24px
24px Leading / -43 Tracking Dev PixeI Spec: -1px Letter spacing
AriaI BoId 20px
20px Leading / -47 Tracking Dev PixeI Spec: -1px Letter spacing
AriaI BoId 16px
18px Leading / 0 Tracking Dev PixeI Spec: 0px Letter spacing
AriaI BoId 14px
18px Leading / 0 Tracking Dev PixeI Spec: 0px Letter spacing
AriaI BoId 13px
16px Leading / 0 Tracking Dev PixeI Spec: 0px Letter spacing
AriaI BoId 12px
ARIAL BOLD CAPITALISED 11px

27
G
E
L

S
t
y
|
e
g
u
|
d
e


V
e
r
s
|
o
n

0
2


[


O
c
t
o
b
e
r

2
0
1
1
03 Bu||d|ng B|ocks Typography
Putt|ng |t together w|th body copy.
Super Header 36px
Header 32px
Subheader 20px
TIME STAMPS 11PT CAPITALS
Copy 13px Ar|a| Bo|d on 16px |ead|ng Lorem |psum do|or s|t amet, con-
sectetur ad|p|sc|ng e||t. Fusce sed |eo. Maecenas u|tr|ces |orem s|t amet
d|am. A||quam so|||c|tud|n tr|st|que nu||a. Du|s ||bero d|am, cond|mentum et,
cond|mentum |n, congue eu, te||us. Phase||us eu e||t at n|s| u|tr|c|es |obort|s.
Suspend|sse porta commodo |eo.
Copy 13px Arial Roman on 16px leading Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Fusce sed leo. Maecenas ultrices lorem sit amet
diam. Aliquam sollicitudin tristique nulla. Duis libero diam, condimentum et,
condimentum in, congue eu, tellus. Phasellus eu elit at nisi ultricies lobortis.
Suspendisse porta commodo leo. Sed tincidunt tincidunt massa.
8px Copy 13px Arial Regular on 16px leading Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Fusce sed leo. Maecenas ultrices lorem sit amet
diam. Aliquam sollicitudin tristique nulla. Duis libero diam, condimentum et,
condimentum in, congue eu, tellus. Phasellus eu elit at nisi ultricies lobortis.
Suspendisse porta commodo leo. Sed tincidunt tincidunt massa. Cras
scelerisque diam non arcu. Donec egestas. lnteger a mi. Aenean tempus, mi
eu luctus imperdiet, erat ligula semper turpis, consectetur faucibus libero ante
non sem. Aliquam quis diam. Pellentesque mollis nisi eget purus. Aenean iaculis
metus vel sem. lnteger at erat.
L|nk - Nam d|ctum n|bh eu arcu
L|nk - Donec egestas |nteger a m|
32
G
E
L

S
t
y
|
e
g
u
|
d
e


V
e
r
s
|
o
n

0
2


[


O
c
t
o
b
e
r

2
0
1
1
L|nks shou|d comp|y w|th ex|st|ng standards and
gu|de||nes. They shou|d be eas||y d|st|ngu|shab|e
from body copy us|ng a comb|nat|on of bo|d type
and co|our, a|ong w|th under||ne or under||ne on
hover. On ro||over ||nks shou|d change co|our
(and under||ne |f under 24px|.
03 Bu||d|ng B|ocks L|nk|ng Convent|ons
Header 36px
Subheader 20px
TIME STAMPS 11Px CAPITALS
Body Copy 13px Ar|a| Bo|d on 16px |ead|ng Lorem |psum do|or s|t amet,
consectetur ad|p|sc|ng e||t. Fusce sed |eo. Maecenas u|tr|ces |orem s|t amet
d|am. A||quam so|||c|tud|n tr|st|que nu||a.
Body Copy 13px Arial Regular on 16px leading Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Fusce sed leo. Maecenas ultrices lorem sit amet
diam. Aliquam sollicitudin tristique nulla.
L|nk Suspend|sse porta commodo |eo. 13px
L|nk Pe||entesque mo|||s n|s| eget purus 13px
COMMENTS 11PX CAPITAL
EMAIL 11PX CAPITAL
PRINT 11PX CAPITAL
8px
30
G
E
L

S
t
y
|
e
g
u
|
d
e


V
e
r
s
|
o
n

0
2


[


O
c
t
o
b
e
r

2
0
1
1
03 Bu||d|ng B|ocks Iconography
We have des|gned a new set of |cons to work |n
harmony w|th the new v|sua| |anguage. The defau|t
s|ze |s 13px and |cons can be used w|th or w|thout
a at button conta|ner. These can be used |n any
co|our un|ess otherw|se spec|ed.
Previous Next Up Down To Top To Bottom
Close/Remove/
No/Delete
Download Upload
Search Unlock
Lock/Security
Yes Help nfo/Caption Alert/Warning Print Email
Vocab On/Off Refresh Alarm/Reminder Duration Countdown Expires Settings
Degraded
Content
Grid View List View (text)
Zoom n Zoom Out
Home
List View
(text and thumb) New/New items Quote External Link Loading Chapters Traffc
Link to This
Embed
For more |nformat|on or for the fu|| set of |cons, v|s|t bbc.co.uk/ge|/|conography.shtm|
G
E
L

P
a
t
t
e
r
n
s


A
c
c
o
r
d
|
o
n


[


M
a
y

2
0
1
0
11
03 A|ternat|ve hor|zonta| accord|on
A|ternat|ve congurat|on for the accord|on
|nc|ude reduc|ng the amount of content |n each
of the pane|s a||ow|ng for a more |mage |ed
treatment.
Accord|on
menu 2
Accord|on
menu 3
Accord|on menu 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
ipsum erat, fringilla vel tristique magna.
2
Part
FASHIONABLY FLEXIBLE RESPONSIVE WEB DESIGN
Plan Design Develop Deploy
Plan Deploy
Design
Hat tip to Ethan Marcotte
Discussion
Josh Emerson
If clients only see flat images of their website, there is a danger
that they are surprised by the outcome when seen in a browser.
http://joshemerson.co.uk/blog/responsive-process/
Step one
Design a exible grid
Sketch out content and functionality (not layout)
Design at the element level
Refer to brand guidelines or style guides
Develop responsive prototypes
Draft copy, data and images (rst iteration)
Step two
Test layouts early on real devices
Iterate through sketches and prototype revisions
Test regularly
Dont agonise over natural differences between devices
Correct only what looks broken
Step three
Create detailed visuals based on prototypes
Draft copy, data and images (second iteration)
Develop nal responsive templates
1. iPad
2. Samsung Galaxy Tab 10.1
3. Kindle 4
4. HTC HD7 Windows Phone 7
5. iPhone
6. iPhone 3G
7. iPhone 4S
1
2
3
4
5
6
7
Andy Clarkes responsive testing rig (February 2012)
Stephanie Riegers Strategies for
choosing test devices
iPhone 3GS, iOS 4.3.n, 320 x 480(no retina display)
iPhone 4, iOS 5,320 x 480 (retina display)
iPad,iOS 5, 1024 x 768 (no retina display)
Android 2.1 Motorola, 480 x 600
Android 2.3 HTC, 480 x 320 (QWERTY)
Android 2.3 Huawei, 320 x 480 (low CPU)
Android 3.0 Samsung, 320 x 480 (low CPU, low dpi)
Android 2.3.4 Kindle Fire, 1024 x 600 (7 tablet)
http://stephanierieger.com/strategies-for-choosing-test-devices/
Emulators
iOS SDK
https://developer.apple.com/devcenter/ios
Android SDK
http://developer.android.com/sdk
Opera Mini Simulator
http://www.opera.com/developer/tools/mini
Opera Mobile Emulator
http://www.opera.com/developer/tools/mobile
Firefox Mobile on desktop
http://www.mozilla.org/en-US/mobile/#desktop
FASHIONABLY FLEXIBLE RESPONSIVE WEB DESIGN
2
Part
PREPARING RESPONSIVE CONTENT
Sean Tubridy
Responsive design. Mobile first. Progressive
enhancement. These, and any other technical approaches
where your content can take different forms across
channels and platforms, present a challenge to content
strategists. The content you create needs to be flexible.
http://blog.braintrafc.com/2012/01/content-strategy-and-responsive-design
Responsive content
Deleted
Collapses
Accordions, carousels and scrollers
Flows
Content blocks change width and height
When should this content collapse?
How should it collapse? Accordion, carousel or scroller?
How should this content ow?
Content strategy questions
Whats the order of importance? Should this go above or below that?
Should this content be deleted?
Prioritising content
Mat Wilto Marquis
Mobile users want to see our menu, hours, and delivery
number. Desktop users definitely want this 1mb png of
someone smiling at a salad.
https://twitter.com/wilto/status/63284673723375616
@wilto
Stephanie Rieger
We need to make smarter content, not
smarter containers.
Linearising content
RESPONSIVE TYPOGRAPHY
FASHIONABLY FLEXIBLE RESPONSIVE WEB DESIGN
Hosted by Andy Clarke
2
Part
iOS 5.0 58
Android 2.3 3
Source: http://goo.gl/rJkVi
Fonts installed
We can improve typography
too by reducing font-size
from 35px to 28px *
*
It looks like Smashing
Magazine tested with
narrow browser windows
and not real devices
21
a
24
a
36
a
48
a
14
a
16
a
18
a
12
a
11
a
10
a
21
a
24
a
36
a
48
a
14
a
16
a
18
a
12
a
11
a
10
a
21
a
24
a
36
a
48
a
14
a
16
a
18
a
12
a
11
a
10
a
Tip: Create a file to test
heading sizes on actual
devices, not narrow
browser windows
Tip: Test body text sizes
with users during the
design phase
http://goo.gl/o23Vc
The problem with ems
body { font-size : 62.5%; }
h1 { font-size : 2.4em; /* 24px */ }
p { font-size : 1.6em; /* 16px */ }
ul { font-size : 1.6em; /* 16px */ }
ul p { font-size : 1.6em; /* ? */ }
Sizing type with rems
body { font-size : 62.5%; }
h1 { font-size : 2.4rem; /* 24px */ }
p { font-size : 1.6rem; /* 16px */ }
ul { font-size : 1.6rem; /* 16px */ }
ul p { font-size : 1.6rem; /* 16px */ }
body { font-size : 62.5%; }
h1 { font-size : 2.4rem; }
p, ul { font-size : 1.6rem; }
/* Internet Explorer 8 */
.ie8 h1 { font-size : 24px; }
.ie8 p, .ie8 ul { font-size : 16px; }
p, ol, ul, dl, address {
line-height : 1.4; }
@media only screen and (min-width: 600px) {
p, ol, ul, dl, address {
line-height : 1.45; }
}
@media only screen and (min-width: 768px) {
p, ol, ul, dl, address {
line-height : 1.5; }
}
Really? Really what? You mean theres more ?
@media all and (min-width: 992px) and (min-height : 34em) {
.entry-summary {
-webkit-column-count : 2;
-webkit-column-gap : 22px;
-moz-column-count : 2;
-moz-column-gap : 22px;
-o-column-count : 2;
-o-column-gap : 22px;
column-count : 2;
column-gap : 22px; }
}
@media all and (min-width: 992px) and (min-height : 34em) {
.entry-summary {
-webkit-column-count : 3;
-webkit-column-gap : 22px;
-moz-column-count : 3;
-moz-column-gap : 22px;
-o-column-count : 3;
-o-column-gap : 22px;
column-count : 3;
column-gap : 22px; }
}
h
t
t
p
:
/
/

t
t
e
x
t
j
s
.
c
o
m
FASHIONABLY FLEXIBLE RESPONSIVE WEB DESIGN
2
Part
DESIGNING RESPONSIVE GRIDS
A uid grid
target context = result
896px
target 896 = result
252px 620px
252 896 = 28.12%
620 896 = 69.19%
* Based on one break starting point. More on that in just a minute
*
Less Framework grid
3 columns at 320px for portrait iPhone
5 columns at 480px for landscape iPhone
6 columns at 600px for Kindle
8 columns at 768px for portrait iPad
10 columns at 992px for common resolution PC
68px columns, 24px gutters
252px content width for portrait iPhone
436px content width for landscape iPhone
528px content width for Kindle
712px content width for portrait iPad
866px content width for common resolution PC
Average common widths before converting to percentages
No single formula
252 is 28.12% of 896
252 is 35.39% of 712
252 is 47.72% of 528
252 is 100% of 252
728 x 90 IMU (Leaderboard)
1
6
0

x

6
0
0

I
M
U

(
W
i
d
e

S
k
y
c
r
a
p
e
r
)
120 x 60 IMU (Button 2)
180 x 150 IMU (Rectangle)
300 x 100 IMU (3:1 Rectangle)
300 x 250 IMU (Medium Rectangle)
24px 24px
84px 84px 84px
IMU-based grid
300 x 100 IMU
(3:1 Rectangle)
IMU-based grid
3 columns at 300px (320)
4 columns at 408px (480)
5 columns at 516px (600)
7 columns at 732px (768)
9 columns at 948px (992)
84px columns, 24px gutters
300px style.css 600px 600.css
732px
768.css
948px
992.css
300 x 100 IMU (3:1 Rectangle)
300 x 100 IMU (3:1 Rectangle)
300 x 100 IMU (3:1 Rectangle)
300 x 100 IMU (3:1 Rectangle) 300 x 100 IMU (3:1 Rectangle) 300 x 100 IMU (3:1 Rectangle)
300 x 100 IMU (3:1 Rectangle)
728 x 90 IMU (Leaderboard)
948px
992.css
732px
768.css
728 x 90 IMU (Leaderboard)
Josh Clark
The 44-pixel block is, in many ways, the basic unit of
measurement for the iPhone inter-face, establishing the
visual rhythm of many iPhone apps. That metric is
significant as the recommended minimum size to make
a tap target (like a button or list item) easily and
reliably tappable.
Josh Clarks book Tapworthy: Designing Great IPhone Apps
44px
44px
44px
88px
22px 22px
88px 88px 88px
44px 44px 44px
Fingertip-based grid
Fingertip-based grid
3 columns at 300px (320)
4 columns at 408px (480)
5 columns at 528px (600)
7 columns at 732px (768)
9 columns at 948px (992)
88px columns, 22px gutters
25px
Mark Boultons pro-tip
Use odd numbered pixels for gutters (21, 23, 25)
to allow for a 1px column rule between columns
25px
Fingertip-based baseline
11px
22px
44px
44px 44px vertical rhythm
11px
44px
22px
Baseline, margins and
touch targets are
multiples of 44px
Use a different grid for
each breakpoint
Jeremy Keith
Breakpoints should not be dictated by devices, but by
content. Let the content decide when to expand and
when adjust your designs.
http://www.lukew.com/ff/entry.asp?1393
FASHIONABLY FLEXIBLE RESPONSIVE WEB DESIGN
2
Part
RESPONSIVE BREAKPOINTS
[Responsive data tables]
1382px Eg: high-resolution PC browser
992px Eg: common resolution PC
768px Eg: portrait iPad
600px Eg: Kindle
480px Eg: landscape iPhone
320px Eg: portrait iPhone
COMMON RESPONSIVE BREAKPOINTS
Major breakpoint
320
Major breakpoint
720
Major breakpoint
1024
Minor
breakpoint
240
Minor
breakpoint
360
Minor
breakpoint
480
Minor
breakpoint
600
Minor
breakpoint
640
Minor
breakpoint
768
Minor
breakpoint
800
Minor
breakpoint
1280
Minor
breakpoint
1366
iPhone, many
Android and
Blackberry devices
Some Android
and many
Blackberry
devices (p)
Symbian
Touch (p)
iPhone,
Android and
some
Symbian
devices (l)
Some tablets
and e-readers
Some
Symbian
Touch (l)
iPad and some
tablets (p)
Some tablets
Some tablets, most
netbooks, many
desktops
Some tablets Many laptops
Hat tip to Stephanie Rieger
Theres no one perfect
set of breakpoints
Trent Walton
To think about the web responsively is
to think about proportions, not pixels.
Speaking at New Adventures In Web Design, January 2012
Keep markup free from presentational attributes
For layout, convert pixels to percentages
Use ems or rems for font sizing
A exible foundation is critical
[Responsive data tables]
[Responsive data tables]
[Responsive data tables]
<div class="frame">
<h2>320x480</h2>
<iframe src="./" sandbox="allow-same-origin allow-forms"
seamless width="320" height="480"></iframe>
</div>
<div class="frame">
<h2>480x640</h2>
<iframe src="./" sandbox="allow-same-origin allow-forms"
seamless width="480" height="640"></iframe>
</div>
[Responsive data tables]
[Responsive data tables]
[Responsive data tables]
Blackberry Bold 9900 Samsung Galaxy Note Samsung Galaxy S2 Samsung Galaxy Nexus Nokia Lumina 800
640x480 800x1200 720x1280 720x1280 480x800
252ppi 316ppi 286ppi 285ppi 217ppi
Source: http://phone-size.com
340x480 640x960 640x480 360x480 480x800 480x800 720x1280
480x800 540x960 480x800 540x960 540x960 320x480 800x1280
Source: http://phone-size.com
600x819
1024x395
[Responsive data tables]
FASHIONABLY FLEXIBLE RESPONSIVE WEB DESIGN
3
Part
http://appsketchbook.com/products/responsive-design-sketchbook
P
R
O
J
E
C
T

N
O
T
E
S
h
t
t
p
:
/
/
j
e
r
e
m
y
p
a
l
f
o
r
d
.
c
o
m
/
a
r
c
h
-
j
o
u
r
n
a
l
/
r
e
s
p
o
n
s
i
v
e
-
w
e
b
-
d
e
s
i
g
n
-
s
k
e
t
c
h
-
s
h
e
e
t
s
These sketch sheets are in the resources download
P
R
O
J
E
C
T

N
O
T
E
S
FASHIONABLY FLEXIBLE RESPONSIVE WEB DESIGN
3
Part
NAVIGATION DESIGN PATTERNS
Reow
Transform
Collapse
Navigation design patterns
Reflowing of navigation
Reflowing of navigation
Navigation linearised
Where did the links to
RSS and Twitter go?
Links dont show up in landscape orientation either
No fast and easy way to
switch to comments
Unclear navigation
Icons removed from
navigation, to save
vertical space?
Rolling up all navigation
into a grid of icons is a
nice touch
Not an exact recreation
of United Pixel Workers
<header role="banner">
<h1>Responsive Web Design</h1>
<nav role="navigation">
<ul>
<li><a href="#">Help</a></li>
<li><a href="#">Cart</a></li>
<li><a href="#">Email</a></li>
<li><a href="#">Twitter</a></li>
</ul>
</nav>
</header>
Three elements: Header, h1 and nav
[role="banner"] h1 {
float : left;
width : 50%;
min-height : 160px;
background-color : #000;
background-image : url(h1.png);
background-repeat : no-repeat;
background-position : 50%;
text-indent : -9999px; }
Float the h1 left and apply a background image.
160px min-height creates a square at 320px
Float the navigation and the list items inside the unordered list.
80px min-height creates a square at 320px
[role="navigation"] {
float : left;
width : 50%; }
[role="navigation"] li {
float : left;
min-height : 80px;
width : 50%;
background-repeat : no-repeat;
background-position : 50%;
text-indent : -9999px; }
<nav role="navigation">
<ul>
<li id="nav-help">[]</li>
<li id="nav-cart">[]</li>
<li id="nav-mail">[]</li>
<li id="nav-tweet">[]</li>
</ul>
</nav>
Add class or id attributes, or use :nth-child pseudo-class selectors
.nav-help {
background-image:url(help.png); }
.nav-cart {
background-image:url(cart.png); }
.nav-mail {
background-image:url(mail.png); }
.nav-tweet {
background-image:url(tweet.png); }
Add background images to each list item
@media only screen
and (min-width : 768px) {
[role="banner"] {
float : left;
width : 26.66%; /* 160px */ }
[role="banner"] h1,
[role="navigation"] {
float : none;
width : 100%; }
}
At 768px breakpoint, float the banner left at 26.66%.
Reset the previously floated h1 and navigation
[role="navigation"] li {
float : none;
min-height : 0;
width : 100%;
text-indent : 0; }
[role="navigation"] li a {
min-height : 0;
padding : 5% 10%;
color : #fff;
font-style : italic;
text-transform : uppercase; }
Reset previously floated list items and style the anchor text
Collapsing navigation and
search into a drop-down
interface
Tap icon to reveal
search input
[Responsive data tables]
Collapsing navigation into
a show (menu) button
Collapsing navigation into
a show (menu) button
Collapsing navigation into
a drop-down interface
Collapsing navigation into
a menu icon
Collapsing navigation into
a menu icon
Good use of the X close icon.
Should this be a standard?
Collapsing navigation into
a menu button
Collapsing navigation into
a menu button
Making good use of large
touch targets. More on
that later
Javascript converts
unordered list into a
select menu.
Javascript converts
unordered list into a
select menu.
Native iPhone select
menu interface used as
navigation
Native iPhone select
menu interface used as
navigation
Collapsing navigation into
a menu button
Collapsing navigation into
a menu button
Transforming links into a
grid of icons. Nice touch!
T
h
i
s


i
s


a


m
o
b
i
l
e
,


n
o
t


a


r
e
s
p
o
n
s
i
v
e


s
i
t
e
Collapsing navigation into
a menu button
Transforming links into a
grid of icons.
<nav role="navigation">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Chat</a></li>
<li><a href="#">Feed</a></li>
<li><a href="#">Email</a></li>
<li><a href="#">Bookmark</a></li>
<li><a href="#">Tag</a></li>
<li><a href="#">Schedule</a></li>
<li><a href="#">Flag</a></li>
<li><a href="#">Delete</a></li>
</ul>
</nav>
Two elements: Nav and unordered list
<nav role="navigation">
<ul>
<li class="nav-home">[]</li>
<li class="nav-chat">[]</li>
<li class="nav-feed">[]</li>
<li class="nav-email">[]</li>
<li class="nav-bookmark">[]</li>
<li class="nav-tag">[]</li>
<li class="nav-schedule">[]</li>
<li class="nav-flag">[]</li>
<li class="nav-delete">[]</li>
</ul>
</nav>
Add class or id attributes, or use :nth-child pseudo-class selectors
[role="navigation"] {
background-color : rgba(0,0,0,.25); }
[role="navigation"] ul {
list-style-type : none;
padding : 22px 0; }
Basic styling for the nav and unordered list
[role="navigation"] li {
float : left;
width : 33.33%;
margin-bottom : 22px; }
.nav-schedule,
.nav-flag,
.nav-delete {
margin-bottom : 0; }
Float the list items inside the unordered list.
[role="navigation"] li a {
display : block;
height : 22px;
padding-top : 84px;
background-repeat : no-repeat;
background-position : 50% 11px; }
.nav-home {
background-image:url(home.png); }
.nav-chat {
background-image:url(chat.png); }
[]
Add background images to each list item
Chat Home Feed
Bookmark Email Tag
Flag Schedule Delete
@media only screen
and (min-width : 768px) {
[role="navigation"] li {
width : 7.58%;
margin : 0 2.67% 0 0; }
[role="navigation"] li a {
padding : 52px 0 0 0; }
}
Chat Home Feed Bookmark Email Tag Flag Schedule Delete
44px
Touch targets should be
a minimum of 44px*,
but visual elements
dont have to be
44px
88px
* Windows Phone: Recommended touch target size 34px
Minimum touch target size 26px
Minimum space between elements 8px
Collapsing navigation into
an accordion interface
What happened to the
footer? How can we
improve the design?
Include only essential navigation
Use top navigation for common tasks
Use bottom navigation for exploring
Dont duplicate navigation
Navigation essentials
T
h
i
s


i
s


a


m
o
b
i
l
e
,


n
o
t


a


r
e
s
p
o
n
s
i
v
e


s
i
t
e
Minimum navigation ,
maximum content
Minimum navigation ,
maximum content
T
h
i
s


i
s


a


m
o
b
i
l
e
,


n
o
t


a


r
e
s
p
o
n
s
i
v
e


s
i
t
e
Minimum navigation ,
maximum content
Tap to reveal search
Full navigation page
Minimum navigation ,
maximum content
T
h
i
s


i
s


a


m
o
b
i
l
e
,


n
o
t


a


r
e
s
p
o
n
s
i
v
e


s
i
t
e
T
h
i
s


i
s


a


m
o
b
i
l
e
,


n
o
t


a


r
e
s
p
o
n
s
i
v
e


s
i
t
e
Minimum navigation ,
maximum content
T
h
i
s


i
s


a


m
o
b
i
l
e
,


n
o
t


a


r
e
s
p
o
n
s
i
v
e


s
i
t
e
Maximum content,
minimum navigation,
although touch targets
are too small. (More on
that later.)
T
h
i
s


i
s


a


m
o
b
i
l
e
,


n
o
t


a


r
e
s
p
o
n
s
i
v
e


s
i
t
e
Maximum navigation
T
h
i
s


i
s


a


m
o
b
i
l
e
,


n
o
t


a


r
e
s
p
o
n
s
i
v
e


s
i
t
e
Maximum navigation
T
h
i
s


i
s


a


m
o
b
i
l
e
,


n
o
t


a


r
e
s
p
o
n
s
i
v
e


s
i
t
e
Maximum navigation
T
h
i
s


i
s


a


m
o
b
i
l
e
,


n
o
t


a


r
e
s
p
o
n
s
i
v
e


s
i
t
e
Full navigation page
Home
Who we are
What we believe in
What we make
80 - 90% of people
are right handed
S
o
u
r
c
e
:

J
o
s
h

C
l
a
r
k

s

b
o
o
k

T
a
p
w
o
r
t
h
y
:

D
e
s
i
g
n
i
n
g

G
r
e
a
t

I
P
h
o
n
e

A
p
p
s
h
t
t
p
:
/
/
k
i
c
k
e
r
s
t
u
d
i
o
.
c
o
m
/
b
l
o
g
/
2
0
1
1
/
0
1
/
a
c
t
i
v
i
t
y
-
z
o
n
e
s
-
f
o
r
-
t
o
u
c
h
s
c
r
e
e
n
-
t
a
b
l
e
t
s
-
a
n
d
-
p
h
o
n
e
s
/
Hard
Easy
Easy
E
a
s
y
Reach
Hard
Easy
Design to a 44px rhythm
Be generous with space
Content rst, navigation second
Hide secondary navigation
Finger-friendly design
Adapted from: http://goo.gl/oQINj
FASHIONABLY FLEXIBLE RESPONSIVE WEB DESIGN
3
Part
MODULE DESIGN PATTERNS
It would be better to float
the calorie count and
nutrition facts. Embrace
the flow.
Watch out for excessive
vertical whitespace
Item Item
Item Item
Item Item
Start with item divisions. Give them widths, float them or use
display:table properties to form a modular grid (more on those later)
A B A B
A B A B
A B A B
Add two elements inside each item. These could be any appropriate block-
level elements. Well call them A and B. Float them when space allows
For small screens, stack items vertically
Item
Item
Item
Float A and B when space allows
A B
A B
A B
Linearising content and
allowing images to scale
to 100% is a common
technique
Item Item Item
Start with item divisions. Give them widths, float them or use
display:table properties. Increase gutters to balance the columns
Add two elements inside each item. These could be any appropriate block-level
elements. Well call them A and B again
A
B
A
B
A
B
Item
Item
For medium screens, stack items vertically
For medium screens, float A and B elements
A B
A B
A
B
For small screens, stack items and
A and B elements vertically
Item
Item
Item
Start with item divisions. Give them widths, float them or use display:table properties
Add two elements inside each item. These could be any appropriate block-level
elements. Well call them A and B. Float them when space allows
A B
A B
A B
Sub-divide the A element into two. Well call them C and D.
Float them when space allows
C D
C D
C D B
B
B
For medium screens, stack A and B elements vertically
B
B
C D
C D
C
B
D
For small screens, stack all elements
(items, A, B, C and D) vertically
Reflowing of branding
and navigation
Ooops. The Boston Globe
has lost its position at the
top of the visual
hierarchy
Two column grid in portrait
Remember to design for the shorter landscape format
You can animate the changes to layout. (See the next slide)
Serving an image thats
larger in height helps
maintain hierarchy
Item
<div class="item">
[]
</div>
Item
.item {
float : left;
width : 28.12%;
margin-right : 7.81%; }
.item:last-child {
margin-right : 0; }
A
B
<div class="item">
<div class="a">
[]
</div>
<div class="b">
[]
</div>
</div>
A B
.a {
float : left;
width : 35.39%;
margin-right : 3.37%; }
.b {
float : left;
width : 61.23%; }
Adds select category label
Javascript converts
unordered list into a
select menu.
Native iPhone select
menu interface. What
might happen with longer
options or non-English
languages?
Ooops! Background
images cut off at
smaller sizes. We can fix
that with CSS3
.promo-item {
background-size : contain; }
Adjust the number of
columns for small screens
Watch out for excessive
vertical whitespace
4
Part
FASHIONABLY FLEXIBLE RESPONSIVE WEB DESIGN
.speaker-carousel {
background-image : url("body.png");
position : absolute;
width : 2025px;
z-index : 30; }
@media
all and (max-device-width: 480px),
all and (max-width: 800px) {
.speaker-carousel {
display : none; }
}
Adding media queries to
desktop sites does not make
a mobile experience
Oh how we laughed when we realised our mistake
Adding icons to navigation
is a nice touch
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" media="all
and (min-width: 45em)" href="layout.css" >
// style.css
.speaker-lineup a { width : 33%; }
@media all and (max-width : 30em) {

.speaker-lineup a:nth-child(1n+0) {
width : 50%; }
.speaker-lineup a:nth-child(1n+3) {
width : 33.3333%; }
.speaker-lineup a:nth-child(1n+6) {
width : 25%; }

}
// layout.css
@media all and (min-width : 70em) {
}
@media all and (max-width : 63em) {
}
@media all and (min-width : 70em) {
}
@media all and (max-width : 60em) {
}
Progressive enhancement
+ content rst
+ responsive design
= Content rst responsive design
Small screen designs are the default
Media Queries scale up, not down
More accessible, more responsible
Content rst responsive layout
<link rel="stylesheet" href="style.css">
@media print {}
@media screen and (min-width : 480px) {}
@media screen and (min-width : 600px) {}
@media screen and (min-width : 768px) {}
@media screen and (min-width : 992px) {}
@media screen and (min-width : 1382px) {}
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" media="print"
href="print.css">
<link rel="stylesheet" media="only screen
and (min-width: 480px)" href="480.css">
<link rel="stylesheet" media="only screen
and (min-width: 600px)" href="600.css">
<link rel="stylesheet" media="only screen
and (min-width: 768px)" href="768.css">
<link rel="stylesheet" media="only screen
and (min-width: 992px)" href="992.css">
Developing a foundation
Content
Develop a foundation stylesheet
Colour, texture and typography
Use rems for font-sizing
Mobile rst images
Minimal Javascript
Optimise images for performance
Enhancing the foundation
Add webfonts over 600px
Use micro-queries for minor breakpoints
Build styles progressively
Use inheritance and the cascade
Lazyload large assets at appropriate sizes
Respond.js or xed-widths for Internet Explorer 68
Major breakpoint
320
Major breakpoint
720
Major breakpoint
1024
Minor
breakpoint
240
Minor
breakpoint
360
Minor
breakpoint
480
Minor
breakpoint
600
Minor
breakpoint
640
Minor
breakpoint
768
Minor
breakpoint
800
Minor
breakpoint
1280
Minor
breakpoint
1366
iPhone, many
Android and
Blackberry devices
Some Android
and many
Blackberry
devices (p)
Symbian
Touch (p)
iPhone,
Android and
some
Symbian
devices (l)
Some tablets
and e-readers
Some
Symbian
Touch (l)
iPad and some
tablets (p)
Some tablets
Some tablets, most
netbooks, many
desktops
Some tablets Many laptops
Hat tip to Stephanie Rieger
<link rel="stylesheet" href="style.css">
@media screen and (min-width : 240px) {
/* Some Android and Blackberry devices (p) */ }
<link rel="stylesheet" href="600.css">
@media screen and (min-width : 640px) {
/* Some Symbian devices */ }
<link rel="stylesheet" href="768.css">
@media screen and (min-width : 800px) {
/* Some tablets */ }
FASHIONABLY FLEXIBLE RESPONSIVE WEB DESIGN
4
Part
FLEXIBLE LAYOUT
Navigation
Complementary
Main
<nav role="navigation">
[]
</nav>
<div class="content">
<div role="main">
[]
</div>
<div role="complementary">
[]
</div>
</div>
A simple, two-column responsive layout
Complementary Main
[role="main"] {
float : left;
width : 48.31%; /* 344px */ }
[role="complementary"] {
float : right;
width : 48.31%; /* 344px */ }
Navigation
Complementary Main
[role="main"] {
width : 69.19%; /* 620px */ }
[role="complementary"] {
width : 28.12%; /* 252px */ }
Navigation
Whats with the whitespace?
Navigation
Content
<nav role="navigation">
[]
</nav>
<div class="content">
[]
</div>
A more complex responsive layout
Navigation
Complementary
Main
<nav role="navigation">
[]
</nav>
<div class="content">
<div role="main">
[]
</div>
<div role="complementary">
[]
</div>
</div>
Navigation
<div role="main">
<div class="content-sub">
[]
</div>
<div class=content-main>
[]
</div>
</div>
Content-sub
Content-main
Complementary
[role="navigation"],
.content {
width : 90%;
margin : 0 auto; }
Navigation
Content
kindle
.content-sub {
float : left;
width : 30.3%; /* 160px */ }
.content-main {
float : right;
width : 65.15%; /* 344px */ }
Content-sub Content-main
kindle
Navigation
Complementary Main
[role="main"] {
float : left;
width : 48.31%; /* 344px */ }
[role="complementary"] {
float : right;
width : 48.31%; /* 344px */ }
Navigation
Content-sub
Content-main
.content-sub,
.content-main {
float : none;
width : auto; }
Complementary Main
[role="main"] {
width : 69.19%; /* 620px */ }
[role="complementary"] {
width : 28.12%; /* 252px */ }
Navigation
Navigation
Complementary
.content-sub {
float : left;
width : 25.8%; /* 160px */ }
.content-main {
float : right;
width : 70.32%; /* 436px */ }
Content-sub Content-main
Nav Content
[role="navigation"] {
float : left;
width : 11.79%; /* 160px */ }
.content {
float : right;
width : 86.43%; /* 1172px */ }
Nav
[role="main"] {
width : 76.45%; /* 896px */ }
[role="complementary"] {
width : 21.5%; /* 252px */ }
Complementary Main
Nav Complementary
.content-sub {
width : 17.85%; /* 160px */ }
.content-main {
width : 79.46%; /* 712px */ }
Content-sub Content-main
Vertical ipping
Home
Who we are
What we believe in
What we make
Display table properties
display : table
Denes element as a block-level table
display : table-caption
Treats element as a caption for the table (caption-side : top | bottom | inherit)
display : table-row
An element represents a row of cells
display : table-cell
An element represents a table cell
Display table properties
display : table-header-group
A row group always displayed before all other rows and row groups
and after any top captions
display : table-footer-group
A row group always displayed after all other rows and row groups and after
any bottom captions
display : table-row-group
One or more rows of cells
Complementary Main
[role="main"],
[role="complementary"] {
display : table-cell; }
table-row
An anonymous box created by applying display:table-cell to an element
table
An anonymous box created by applying display:table-cell to an element
Navigation
Content
<div class="content">
<a href="#nav">Navigation</a>
[]
</div>
<nav id="nav">
[]
</nav>
Vertical flip using display:table properties
a[href="#nav"] {
display : none; }
body {
display : table;
border-collapse : collapse; }
[role="navigation"] {
display : table-header-group; }
Content
Navigation
Content
.content {
display : table;
border-collapse : collapse; }
Navigation
Complementary Main
[role="main"] {
display : table-cell;
width : 64.6%; }
[role="complementary"] {
display : table-cell;
width : 35.39%; }
Navigation
Complementary Main
[role="main"] {
width : 71.87%; }
[role="complementary"] {
width : 28.12%; }
Navigation
Handling xed-width content
728 x 90 IMU (Leaderboard)
1
6
0

x

6
0
0

I
M
U

(
W
i
d
e

S
k
y
c
r
a
p
e
r
)
120 x 60 IMU (Button 2)
180 x 150 IMU (Rectangle)
300 x 100 IMU (3:1 Rectangle)
300 x 250 IMU (Medium Rectangle)
Roger Black
there is no single way to buy and insert adaptive ads
across the platforms. The Interactive Advertising
Bureau, which has worked over the years to promote
standard sizes for ads for the desktop web, doesnt even
list mobile ad sizes with its web ad units, offering only a
PDF with prevailing sizes.
http://rogerblack.com/blog/post/the_holy_grail_part_2
Mark Boultons slot packages
Leaderboard
Banner
MMU
Small screens
Banner
Medium screens
Banner
MMU
Large screens
Leaderboard
Banner
MMU
Navigation
Content
<nav role="navigation">
[]
</nav>
<div class="content">
[]
</div>
Navigation
Main
Complementary
<nav role="navigation">
[]
</nav>
<div class="content">
<div role="main">
[]
</div>
<div role="complementary">
[]
</div>
</div>
Navigation
<nav role="navigation">
<div class="a728x90">[]</div>
</nav>
<div role="complementary">
<div class="a300x100">[]</div>
<div class="a300x100">[]</div>
<div class="a300x250">[]</div>
</div>
Complementary
.a728x90 {
display : none; }
300x100
300x100
300x250
Complementary Main
[role="main"] {
float : left;
width : 54.737%; /* 408px */ }
[role="complementary"] {
float : right;
width : 40.983%; /* 300px */
min-width : 300px;}
Navigation
300x100
300x100
300x250
Main
728x90
Complementary Main
728x90
300x100 300x100 300x100
Complementary Main
FASHIONABLY FLEXIBLE RESPONSIVE WEB DESIGN
4
Part
RESPONSIVE IMAGES
img {
max-width : 100%;
}
Mat Marquis
To use this effectively, though, the image must
be large enough to scale up to whatever size
we can reasonably expect on the largest
possible display. This can mean a great deal of
overhead. At best its just wasteful.
http://alistapart.com/articles/responsive-images-how-they-almost-worked-and-what-we-need
960 x 1280
960 x 1280 320 x 426
<img
src="pig-small.jpg
?full=pig.jpg" alt="">
A small image should be default
Dont load images twice
Adaptive images
Small image is the default
Larger image is loaded when width allows
Apparent speed vs actual speed
Responsive Enhance
Josh Emerson
A small image is always downloaded. If needed, a large image is
downloaded in the background, and replaces the small image only
once its fully downloaded. This results in a faster perceived page
load speed, but a slower actual speed. Im happy with this solution
as I care more about perceived speed than actual speed.
http://joshemerson.co.uk/blog/responsive-process/
<img id="img1" src="img-small-1.jpg" alt=""
data-fullsrc="img-large-1.jpg">
<img id="img2" src="img-small-2.jpg" alt=""
data-fullsrc="img-large-2.jpg">
<img id="img3" src="img-small-3.jpg" alt=""
data-fullsrc="img-large-3.jpg">
<script src="responsive-enhance.js"></script>
<script>
responsiveEnhance(document.getElementById('img1'), 400);
responsiveEnhance(document.getElementById('img2'), 300);
responsiveEnhance(document.getElementById('img3'), 200);
</script>
img,
object {
max-width : 100%;
}
h
t
t
p
:
/
/

t
v
i
d
s
j
s
.
c
o
m
<div class="video">
<object>[]</object>
</div>
.video {
position : relative;
padding-bottom : 20%;
height : 0;
}
.video object {
position : absolute;
top : 0;
left : 0;
width : 100%;
height : 100%;
}
CSS
FASHIONABLY FLEXIBLE RESPONSIVE WEB DESIGN
4
Part
RESPONSIVE DATA TABLES
[Responsive data tables]
Dont assume that screen size
relates to browser capabilities
Trackball
Touchscreen
Trackpad
[Modernizr]
if (Modernizr.touch){
// Touchstart, touchmove, etc and watch event.streamId
} else {
// Normal click, mousemove, etc.
}
.touch {
/* Styles for touch screen devices */ }
.no-touch {
/* Styles for non-touch screen devices */ }
JAVASCRIPT
CSS
Use Modernizr to detect touch
Design alternative without hover-based menus
Move content and tools from hover-based menus
Consider hover
Articles
Responsive by default
http://goo.gl/IiL35
A Richer Canvas
http://goo.gl/lWDxC
Responsive Advertising
http://goo.gl/MGhGo
You Say Responsive, I Say Adaptive
http://goo.gl/tA1zJ
Code
A Responsive Design Approach for
Complex, Multicolumn Data Tables
http://goo.gl/n8S1q
Responsive Data Table Roundup
http://goo.gl/3GVox
Debugging CSS Media Queries
http://goo.gl/5eawI
Convert a Menu to a Dropdown for Small Screens
http://goo.gl/KDE9t
Conference talks and podcasts
There Is No Mobile Web (Jeremy Keith)
http://goo.gl/pFCX7
For a Future-Friendly Web
http://goo.gl/BGcHn
Structured Content First (Stephen Hay)
http://goo.gl/HI6RE
Pragmatic responsive design
http://goo.gl/d2daW
Content strategy
Content Strategy and Responsive Design
http://goo.gl/fFbzq
Structured Content, Shifting Context: Responsive
Design, Content Strategy & the Future
http://goo.gl/eLHE1
Mobile content strategy link-o-rama2011
http://goo.gl/8YmQK
Design
New Visual Proportions for the iOS User Interface
http://goo.gl/gO78I
Content Choreography
http://goo.gl/ohLLt
The typography-out approach in the world of
browser-based web design
http://goo.gl/oDWQ4
@malarkey
http://ickr.com/photos/25688037@N04/5511202367 http://ickr.com/photos/53831770@N03/5518688331 http://ickr.com/photos/ohmystars/6163991574
CREDIT WHERE CREDITS DUE
http://jamieoliver.com http://bbc.co.uk/guidelines/gel/
FRV BRAND GUIDELINES ES
Bonus
<input type="number">
<input type="number">
<input type="email">
<input type="email">
<input type="email">
<input type="tel">
<input type="tel">
<input type="url">
<input type="month">
<input type="date">
<input type="time">
<input type="datetime">

You might also like