g3 Survey Resp Web Design
g3 Survey Resp Web Design
g3 Survey Resp Web Design
Abstract
Nowadays, a large range of different devices exist to visit websites and each of them has a different screen size.
So, web designers have to deal with the problem of how to present the website on different screens. On large
screens, there is space for more information than on tiny screens. Furthermore, a mobile user has other needs
than a user who browses from a PC. Recently, a new way of thinking emerged to answer to this problematic:
Responsive Web Design. Responsive Web Design is a new technique to develop one single website which looks
different for different screen sizes so that it is usable on every device.
This survey as part of the course ”Information Architecture and Web Usability” lectured by Ao.Univ.-Prof.
Dr. Keith Andrews, presents the state-of-the-art article of Responsive Web Design. First, the problem with fixed
width websites is introduced and a definition of the problem is stated. Then, some different ways of thinking
are introduced: the desktop first philosophy, the mobile first philosophy as well as some thoughts about when to
develop a native application and when to develop a web application. In the next chapter, all existing techniques
to create a responsive website are explained: Flexible Grids, Flexible Images, Media Queries, Responsive
Typography, and Responsive E-Mail Systems. Before the conclusion, where the limits of Responsive Web
Design are disclosed, two pretty good examples of how a responsive website could look like, are presented and
explained.
For this survey, we used the LaTeX skeleton of Ao.Univ.-Prof. Dr. Keith Andrews [2011]with his kind
permission.
Contents
1 Introduction 1
1.1 Context and Problematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Purpose of this survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3 Ways of Thinking 7
3.1 Growth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Desktop first . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3 Mobile first . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.4 Native App vs. Web App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 Existing Techniques 13
4.1 Flexible Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.1.1 Example Fluid Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2 Fluid Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.2.1 CSS Cropping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2.2 Max-Width Attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2.3 Multiple Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3 Media Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.4 Responsive Typography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.5 Responsive E-Mail Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6 Conclusion 27
References 30
i
ii
List of Figures
iii
iv
List of Listings
v
vi
Chapter 1
Introduction
Responsive web design is a very new topic and continuously draws attention. This chapter presents a detailed
explanation why responsive web design became very important and why it is not possible to go on designing
websites with a fixed width style. At the end of this chapter a short annotation is pronounced with which aim
this survey was written.
Figure 1.1: These are the most common screen sizes and formats after evaluating about 400 device models
collected during the years 2005 to 2008. Adapted from [Hjerde, 2008]
Many website developers do not care about this problem. They do not use small devices and do not think
about their users. What often comes out is a fixed website without any flexibility in space. For example see the
1
2 CHAPTER 1. INTRODUCTION
website of ORF shown in Figures 1.2, 1.3, 1.4, and 1.5. Some of the web developers implement two different
styles for their site: one for PCs and another one for mobile devices. As it was just mentioned before, that
there is an infinite amount of displays nowadays and some of them can switch their display from portrait to
landscape, so, it is absolutely impossible to design an extra site for all that devices and views. There is the idea
of grouping the most common sizes and designing for them, but who knows what common sizes there will be
in the next years? To get this problem under control, a new approach is born: responsive web design!
Figure 1.2: The website of ORF is developed in a fixed style. On wide screens, much space is lost on the
right hand side.
Figure 1.3: The website of ORF is developed in a fixed style. Only for that screen size the page is opti-
mised.
Figure 1.4: The website of ORF is developed in a fixed style. On small devices, the design looks messy
and completely unmanageable.
Figure 1.5: The website of ORF is developed in a fixed style. On tiny devices, the page is unusable.
4 CHAPTER 1. INTRODUCTION
Chapter 2
This chapter explains what Responsive Web Design is, where the name comes from, as well as its objectives.
2.1 Definition
”Responsive Web Design” is a name given to the set of techniques applied at the level of the layout, so that it
allows a website to adapt itself to any device or width of screen. (Figure 5.2)
Another name used to describe this set of techniques is ”Adaptive Web Design”. According to Harry
Roberts and Paul Gordon, this name would match more since ”the website really adapts to the device, rather
than responding continuously to changes in its environment”. [Doyle, 2011]
Figure 2.1: Example of a responsive web site : the layout changes according to the size of the
screen.[WebDesignShock, 2011]
5
6 CHAPTER 2. WHAT IS RESPONSIVE WEB DESIGN ?
Figure 2.2: Responsive Architecture: The color of the wall is changing according to people’s need.
[SmartGlass International, 2011]
2.3 Objectives
Concretely, the main goals would be:
• Adapting the layout to suit different screen sizes, from wide-screen desktops to tiny phones
• Providing larger, finger-friendly links and buttons for mobile users, and
• Detecting and responding to mobile features such as Geo-location and device orientation.
[Doyle, 2011]
Chapter 3
Ways of Thinking
In this chapter we will discuss different ways of thinking when creating a web page. We will talk about the
Mobile First philosophy and explain why it’s getting more and more popular today.
This chapter is based on the book of Luke Wroblewski [2011] called Mobile First.
3.1 Growth
The main reason why responsive Web design and all these techniques exist is that ”mobile is growing like
crazy”. While analysts around the world have predicted that mobile will be the ”next big thing”, their words
are just becoming true in a very big way. In a very big way, because global smartphone shipments surpassed
global PC shipments two years earlier than they predicted [Ferguson, 2011]. That means more people will be
using mobile devices to access the web than those getting online via desktops or laptops. In the last years,
namely november 2010, visitors to web-based email sites declined 6%, but the number of users accessing their
emails on a smartphone grew up by 36% [comScore, 2011]. And here are some more numbers: traffic to mobile
websites in 2010 grew 600% after tripling between 2009 and 2010 [Daly, 2010].
But something had to happen that started this avalanche of mobile internet growth. On June 29, 2007, Steve
Jobs introduced the first iPhone. It’s hard to deny the impact this device has had on the mobile internet. It was
the first mobile phone, the first smartphone on which browsing the internet was really fun. Looking at AT&T’s
mobile data traffic from 2006 to 2009 (when it was the exclusive carrier of the iPhone in the US), well the chart
speaks clearly (Figure 3.1).
But mobile isn’t growing just because devices are getting better. They are also getting cheaper. People
who could never afford a desktop or laptop can now get online using cheap mobile devices and increasingly
affordable mobile data plans. But this isn’t the only thing helping mobile internet to grow. Broader coverage
of faster networks has also been helping. In 2010 alone, mobile network speeds doubled. As networks became
twice as fast, the average data usage of smart phones doubled as well.
Well, if this isn’t a good reason of creating mobile websites than what is?
Most web teams have designed websites and services for desktops and laptops for years. They used this, now
so called, Desktop first philosophy. Well they were right, very few people used the web on mobiles, there was
no special need of creating mobile web pages or mobile optimized sites. In the past few years however things
have changed significantly. Starting with the desktop may be an increasingly backward way of thinking about
a web product. Figure 3.2 shows an example of a website and its mobile web experience companion.
7
8 CHAPTER 3. WAYS OF THINKING
Figure 3.1: AT&T Mobile data traffic increases between 2006 and 2009.
Figure 3.2: Southwest Airlines website - desktop website and mobile web experience example.
we do, it won’t be as smooth and as responsive as a native application. Figure 3.4 shows an example of a native
App.
But it’s not just that what counts. Native applications gives us access to the devices hardware capabilities,
that we currently can’t get through mobile web browsers. Features like access to the built-in sensors, camera,
audio inputs, system databases like SMS, address book are unavailable through a mobile web browser. A native
app can also benefit from the devices whole computation power. The ability to run processes in the background
is also absent in a mobile browser. And an other important thing is that web apps can’t get to the native app
store and have it much harder to get to users bookmarks or home screen. So if our application requires deeper
hardware access the way to go is the way of native apps, but we can’t put a dot here. If we build a native app
for one platform (but which one?) we might not be able to create one for every platform. There is Apple iOS,
Google Android, Microsoft Windows Phone 7, Samsung’s Bada, Nokia’s Symbian, RIM’s Blackberry. Every
platform requires an other technology, other programming language and other techniques. But even if we could
create a native app for every platform that doesn’t mean it would be affordable. The mobile web could be our
most popular mobile web experience anyway. 14% of Twitter users use the mobile web compared to 8% using
the native iOS app and 7% using the Blackberry native app. The rest of Twitter’s native applications are used by
less than 4% of the users [Williams, 2010]. Facebook is in a similar situation. Mobile strategist Jason Grigsby
is pointing out: “Web links don’t open apps, they go to web pages” [Grigsby, 2011]. Whether is through search,
email, social networks, or on web pages, if we have useful information online, people will find and share links
to it. Not having a mobile web solutions means anyone following those links wont have a great mobile web
experience.
3.5 Conclusion
Today’s mobile device is our true personal computer: always with us, connected to the internet, packed with all
the mails and content we need for our digital life. The idea of starting with the mobile devices allow us to take
advantage of the huge growth in mobile internet usage and find new ways for people to use our websites and
applications. So the simple guideline is, whatever you do, do it mobile first.
10 CHAPTER 3. WAYS OF THINKING
Figure 3.3: On the left: viewing a desktop website in Mobile Safari on iPhone. Not a fun experience.
On the right: viewing a mobile optimized website in Mobile Safari on iPhone.
3.5. CONCLUSION 11
Existing Techniques
This chapter presents a description and expamples of the main techniques of Responsive Web Design :
• Flexible Grid
• Flexible Images
• Media Queries
• Responsive Typography
It is important to notice that most of the sources we use in this chapter are based Ethan Marcotte’s book
[Marcotte, 2011].
• Layout width
• Minimal width
• Maximal width
The layout width defines the general layout size and should be a percentage value, to assure that the hole
design resized in relation to the available width of the browser window. To make sure that the content fits
perfectly in the provided grid it is necessary to set the minimal width in fixed pixel. The maximum width
should be specified in em (a unit of measurement in the field of typography which defines the size in relation to
13
14 CHAPTER 4. EXISTING TECHNIQUES
the font size of the parent element) and takes care that the design gets not too large when the screen resolutions
increases. [Jesse, 2008]
Although fluid grids provide an accurate resizing when the screen resolution changes, sometimes there
appear some problems. For example, a user wants to view a multiple column design on his smartphone screen.
So the designer can choose between different options to handle this problem. The first one is to use media
queries, which are considered more exact in chapter 4.3, or to design two versions of the website, one for
mobile devices and one for desktops. [WebDesignShock, 2011]
Figure 4.2: Concept for a flexible grid design with a header and two coloums, information and content.
The example shows how to build up a flexible grid design for the concept as it is shown in Figure 4.2. First,
of all the proportions of all elements have to be calculated:
4.1. FLEXIBLE GRID 15
1
2 #home{
3 margin : 25px auto ;
4 max−width : 60em ; }
5
6 . header{
7 width : 98%;
8 height18%;
9 padding : 1%;
10 background−color : # FD6579 ; }
11
12 . main{
13 width : 100%;
14 background−color : # C0C0C0 ; }
15
16 . main . content{
17 margin−left : 30%;
18 width : 68%;
19 padding : 1 % ;
20 background−color : # ADFF2F ; }
21
22 . main . info{
23 float : left ;
24 width : 28%;
25 padding : 1 % ;
26 background−color : # FFD700 ; }
Listing 4.1: CSS file of the flexible grid example shown in Figure 4.2.
Finally, it is necessary to build up the “Hypertext Markup Language” (HTML) File with the above defined
elements. Below, the finished flexible grid design is shown for a small (Figure 4.3) and a large (Figure 4.4)
screen resolution.
16 CHAPTER 4. EXISTING TECHNIQUES
Figure 4.4: The flexible grid example resized on a low screen resolution.
• CSS Cropping
Example
1 <html>
2 <head><title>Flexible Images − Cropping</title>
3
4 <style type=”text / css”>
5 div#foreground {
6 overflow : hidden ;
7 width : 5 0 % : / * flexible value * /
8 height : 206px ; / * fixed value * /
9 border : 2px solid # 0 0 0 ;
10 }
11
12 div#foreground img {
13 float : left ; / * defines which side gets cut * /
14 }
15
16 </style></head>
17 <body>
18 <div id=”foreground”>
19 <img src=”logo_big . png” width=”450” height=”206”/ >
20 </div>
21 </body>
22 </html>
Listing 4.2: Html-file for the flexible image method cropping shown in Figure 4.5 and 4.6.
18 CHAPTER 4. EXISTING TECHNIQUES
Example
1 <html>
2 <head><title>Flexible Images − Max Width</title>
3
4 <style type=”text / css”>
5 div#foreground {
6 width : 5 0 % ;
7 border : 2px solid # 0 0 0 ;
8 }
9
10 div#foreground img {
11 max−width : 100%; / * low screen resolution = low width * /
12 }
13
14 </style></head>
15 <body>
16 <div id=”foreground”>
4.2. FLUID IMAGES 19
Listing 4.3: Html-file for the flexible image method max-width shown in Figure 4.7.
Example
1 <html>
2 <head><title>Flexible Images − Multiple Images</title>
3
4 <style type=”text / css”>
5 @media ( min−device−width : 4 0 0 px ) {
6 img [ data−src−400px ] {
7 content : attr ( data−src−400px , url ) ;
8 }
9 }
10
11 @media ( min−device−width : 8 0 0 px ) {
12 img [ data−src−800px ] {
13 content : attr ( data−src−800px , url ) ;
14 }
15 }
20 CHAPTER 4. EXISTING TECHNIQUES
16
17 </style></head>
18 <body>
19 <img src=”logo . png”
20 data−src−400px=”logo . png”
21 data−src−800px=”logo_big . png” />
22 </body>
23 </html>
Listing 4.4: Html-file for the flexible image method multiple images.
Example
Listing 4.5: Example of linking a stylesheet if the device screen matches the query.
2. the actual query enclosed within parentheses, containing a particular media feature (max-device-width)
to inspect, followed by the target value (480px).
In this example we ask the device, whether it’s screen size is equal to or less than 480px. If the test passes,
for example if we are viewing the site on an iPhone, the CSS style ”style.css” is applied. Otherwise the link is
ignored.
We are of course not limited to use the query in the link only. If we include them in the CSS, is enough if
we link one CSS to the site and all the media-query stuff and style can be done there. The next one is a just a
general media query example.
4.4. RESPONSIVE TYPOGRAPHY 21
Example
But in each case, the effect is the same: If the device passes the test put forth by our media query, the
relevant CSS is applied to our markup. Media queries are, in short, conditional comments for the rest of us.
Rather than targeting a specific version of a specific browser, we can surgically correct issues in our layout as
it scales beyond its initial, ideal resolution. [Marcotte, 2010]
The ”min-width” and ”max-width” properties do exactly what they suggest. The min-width property sets
a minimum browser or screen width that a certain set of styles (or separate style sheet) would apply to. If
anything is below this limit, the style sheet link or styles will be ignored. The max-width property does just the
opposite. Anything above the maximum browser or screen width specified would not apply to the respective
media query. [Knight, 2011]
While the above ”min-width” and ”max-width” can apply to either screen size or browser width, sometimes
we’d like a media query that is relevant to device width specifically. This means that even if a browser or other
viewing area is minimized to something smaller, the media query would still apply to the size of the actual
device. The ”min-device-width” and ”max-device-width” media query properties are great for targeting certain
devices with set dimensions, without applying the same styles to other screen sizes in a browser that mimics
the device’s size. [Knight, 2011]
For example the query @media screen and (max−device−width: 480px) will be applied on an iPhone.
The query @media screen and (min−device−width: 768px) will be applied on an iPad. The media query
property “orientation” is useful when designing a page for the iPad. The value can be either landscape (hori-
zontal orientation) or portrait (vertical orientation).
Unfortunately, this property works only on the iPad. When determining the orientation for the iPhone and
other devices, the use of max-device-width and min-device-width should do the trick. [Knight, 2011]
Another method that can be used is JavaScript, especially as a back-up to devices that don’t support all of
the CSS3 media query options. Fortunately, there is already a pre-made JavaScript library that makes older
browsers (IE 5+, Firefox 1+, Safari 2) support CSS3 media queries. There are many solutions for pairing up
JavaScript with CSS media queries. Remember that media queries are not an absolute answer, but rather are
fantastic options for responsive Web design when it comes to pure CSS-based solutions. With the addition of
JavaScript, we can accomodate far more variations. [Knight, 2011]
2. Using min-/max-width
Often, both approaches are used together. Using percentage units (em) in the CSS files is the common
solution to receive decent measures for every screen size. On the website of WebDesignShock [2011] it is
22 CHAPTER 4. EXISTING TECHNIQUES
recommended to base the whole layout on setting all font sizes in percentage units (em), because in this way it
is assured that the page remains resolution independent and that is why it is perfectly useable for different envi-
ronments. WebDesignShock also recommends to use the max-width property in addition, to define a maximum
line length of a paragraph. The max-width property is important for large screens, especially for wide-screens,
because long lines are hard to read and users will not read long line text. Contrariwise, extremely short lines
are exhausting to read, too. Users will not read text where every single word stands in a new line or every word
is cut off at the end of a short line. Therefore, the min-width property should be used in the CSS file to avoid
this problem.
Using about 66 characters per line makes the text readable in a comfortable way, but of course, the amount
of the characters depends on the font. Usually, using around 30em will work fine. [WebDesignShock, 2011]
Elliot Jay Stocks [2011] writes in his article that for some people who are doing responsive web design,
using max-width property appears completely wrong, because on larger screens, some fluid layouts may at first
appear to use a fixed width. For Elliot Jay Stocks using max-width is an important tool for responsive web
design, because ”if a layout continues to grow until the measure becomes uncomfortably long and the reader
struggles to move from line to line, that is not responsive” [Stocks, 2011].
in the CSS file, it can be ensured, that displays with a screen dimension of up to 480 pixels use the styles
specified in that closure, whereas 480px is the width of a flipped iPone’s display. For that size it would be a
good idea to override the inline styles, modify the paddings and margins of the header and the body as well
as the font size of the header so that the headings are not too large and the content of the mail is readable in a
comfortable way. Furthermore, pictures should be scaled down for small screens so that scrolling is prevented.
[WebDesignShock, 2011]
For screens of the iPad,
should be used. Font sizes and margins should be a bit bigger than for the smart phones to profit from the
larger screen space. If it is possible or necessary, the navigation should be reorganised to avoid wrapping.
[Fedorenko, 2011]
With the help of
used in the CSS file, it can be ensured, that the text font is not scaled down to an unreadable size. The minimum
text size must not get smaller than 12 pixels, better would be 17 to 22 pixels. [WebDesignShock, 2011]
Another important aspect of creating a responsive e-mail system is to hide unimportant content for smaller
displays especially for mobile devices, so that the main content is as easy to read as possible and users get a
good overview of the contend. This can be done with a simple hide class command in the CSS for any images,
tables or paragraphs. [Greiner, 2011a]
Figure 4.8 provides a good example design of how to show a responsive e-mail on an iPhone.
Figure 4.8: A good solution to realise a responsive e-mail system, here pictured on an iPhone device.
Adapted from [WebDesignShock, 2011]
24 CHAPTER 4. EXISTING TECHNIQUES
Chapter 5
In this chapter, we present two examples which make particulary good use of the responsive design techniques
we presented in Chapter 4: 3200 Tigres and The Boston Globe.
25
26 CHAPTER 5. EXAMPLES OF RESPONSIVE WEBSITES
Conclusion
In this survey, we presented in which context appeared ”Responsive Web Design”. With the development of
mobile devices, different size of screen appeared. Then we defined what it exactly is and how it answered to
that problematic. And finally, we showed the main techniques used to make responsive websites with a few
examples to illustrate them.
Since we tried those techniques ourself, we can say that they are really efficient and easy to implement.
However it is important to present a few limits.
First, mobile and desktop don’t have the same resources and speed. So it may be necessary to study the
possibility to develop a mobile version independently to the desktop version, in order to improve the mobile
user experience. This can be done through a mobile version of the website or an application for smartphone for
example.
Second, mobile needs may be different from the desktop needs. For example, an user who visits the website of
a restaurant may want to see pictures of the menu or pictures of the restaurant, whereas an user who visits the
website from its mobile may want to see opening times or location of the restaurant. Thus, it is necessary to
study and focus on users’ needs.
To conclude, ”Responsive Web Design” is still a recent concept. It presents of course limits and alternatives,
but it may also evolve to become an unavoidable good practice in web designing.
27
28 CHAPTER 6. CONCLUSION
References
comScore, Inc. [2011]. Email Evolution: Web-based Email Shows Signs of Decline in the U.S. While Mobile
Email Usage on the Rise. http://www.comscore.com/Press_Events/Press_Releases/2011/
1/Web-based_Email_Shows_Signs_of_Decline_in_the_U.S._While_Mobile_Email_Usage_
on_the_Rise.
Daly, Vanessa [2010]. Smartphone market drives 600% growth in mobile web usage. http://news.bango.
com/2010/02/16/600-percent-growth-in-mobile-web-usage/.
Fedorenko, Eugene [2011]. Responsive design for email - the largest mobile audience. http://wildbit.
com/blog/2011/06/30/design-for-the-largest-mobile-audience-email-clients/.
Gillenwater, Zoe Mickley [2009]. Hiding and revealing portions of images. http://zomigi.com/blog/
hiding-and-revealing-portions-of-images/.
Greiner, David [2011a]. Mobile email design in practice: the new Campaign Monitor newsletter. http:
//www.campaignmonitor.com/blog/post/3442/mobile-email-design-in-practice/.
Jesse, Dirk [2008]. Flexible Layouts - die Herausforderung der Zukunft. http://www.drweb.de/magazin/
flexible-layouts-die-herausforderung-der-zukunft/.
Johansson, Roger [2007]. Poll results: 50.4% of respondents maximise windows. http:
//www.456bereastreet.com/archive/200704/poll_results_504_of_respondents_
maximise_windows/.
29
30 REFERENCES
Knight, Kayla [2011]. Responsive Web Design: What It Is and How To Use It.
http://coding.
smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/.
Marcotte, Ethan [2011]. Responsive Web Design. A Book Apart Edition. Jeffrey Zeldman. ISBN 978-0-
9844425-7-7. http://www.abookapart.com/products/responsive-web-design.
Stocks, Elliot Jay [2011]. The typography-out approach in the world of browser-based web de-
sign. http://elliotjaystocks.com/blog/the-typography-out-approach-in-the-world-
of-browser-based-web-design/.
Wroblewski, Luke [2011]. Mobile First. first Edition. Jeffrey Zeldman. ISBN 9781937557027. http://www.
abookapart.com/products/mobile-first.