BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Guidelines for Responsive Website Design

Guidelines for Responsive Website Design

Leia em Português

This item in japanese

Lire ce contenu en français

Bookmarks

This article includes several guidelines for creating websites that scale for different screen sizes and form factors.

During QA TechWeek 2014, David Walker, Principle Technologist for QA,  has presented guidelines for creating a Responsive Website Design during the session Going Responsive with Foundation. Walker mentioned several ways of creating websites for mobile applications starting from an existing one for the desktop: Native App – one for each mobile OS, Embedded HTML5 – using PhoneGap or similar, Filtering at the server – separate websites for the desktop and mobile devices with redirection between the two.

After the pros and cons for each of these methods, Walker introduced Responsive Website Design (RWD) which involves creating a single website whose layout, format and content is adjusted on the fly for the device it is displayed on using HTML5, JavaScript and CSS. The main benefits of RWD are less duplication of content and having the website ready for all sorts of device sizes including future ones. The cons are: needs excellent CSS and JavaScript skills, some of the resources may be large for mobile networks, and requires polyfills for older browsers.

To be able to create a responsive design, Walker suggested following a number of guidelines:

  • Creating a fluid layout. All container widths must be defined as percentages of the browser’s viewport.
  • Using CSS3 Media Queries. Different styles will be applied to different media types –screen, print, TV, etc.- and media parameters –width, height, color, resolution, etc.
  • Using fluid images. Image size should be adjusted, being not larger than the maximum display width.

To decide what style applies to what media type one needs to establish which are the different display widths that require different styles. For example, www.time.com uses over 40 styles associated with media queries. They can be seen with the Responsive Inspector, a Chrome extension. By using all these styles, the content of time.com is rearranged at the browser level so it is shown on devices with different widths without having to scroll the page horizontally.

According to Walker, doing RWD also requires considering the following:

  • Optimizing images for different devices and connection speeds
  • Changing navigational patterns for mobile UI/UX
  • Restyling links and buttons to be touch friendly
  • Dynamically resizing fonts to work better at different screen resolutions
  • Loading content as required, not hiding it from the screen
  • Providing retina versions of graphics

Walker also demos how to create responsive websites with Foundation, an open source responsive front-end framework. Another similar solution is Bootstrap, a framework initially developed by Twitter. 

Rate this Article

Adoption
Style

BT