In 2012, more people are opening websites on mobile phones, but many pages are still made for a wide computer screen. On a narrow display, a visitor may have to zoom, scroll sideways or search for small links. Responsive web design offers a practical way to make the same website easier to use across different screen sizes.
One layout that can adjust
The idea is not simply to shrink a desktop page. Ethan Marcotte's 2010 article in A List Apart explained responsive design through fluid grids, flexible images and CSS media queries. In June 2012, the W3C published Media Queries Level 3 as a Recommendation. A media query lets a page use different styles when the browser window has a certain width.
A fluid layout uses relative widths, such as percentages, so columns can grow or become narrower. Images should fit inside their columns instead of forcing the page wider. A developer can also add a viewport setting in the page head so a mobile browser uses the device width as the page's layout width.
img { max-width: 100%; height: auto; }
@media screen and (max-width: 600px) {
.columns { display: block; }
nav a { padding: 10px; }
}This small example lets images scale down and stacks a two-column area when the screen is narrow. The width is only a starting point. A developer should choose breakpoints after the content begins to feel crowded, not because one phone model has a particular size.
Remember the person using the phone
Mobile visitors may be reading outside the home, using a slower connection or holding the phone in one hand. Keep headings clear, give links enough space to tap and avoid making important words part of an image. Large photographs can take time to load, so prepare sensible image sizes and do not add decoration that makes the page heavy.
Responsive design also helps a site avoid maintaining a separate set of pages for every screen size. That can make updates easier, but one flexible design still needs testing. A menu that looks fine on a desktop may cover the whole phone screen. A table may need a different treatment, and a form with tiny boxes can be frustrating.
Test the page at several widths
Check | What to look for |
|---|---|
Text and columns | Words stay readable and columns do not force sideways scrolling |
Images | Pictures fit their area and keep their proportions |
Links and controls | Buttons and links are easy to tap without hitting a neighbour |
Loading | Useful content appears without unnecessary large files |
Try the page in a desktop browser at different widths and, when possible, on a real phone. Check the whole path: opening the menu, reading an article, filling a form and returning to the main page. A responsive page is successful when people can complete these tasks comfortably, not only when the design looks fashionable.
A useful step for the mobile web
For a small website owner, the first job is to organise the information and make the page flexible. The same principles also change how we use computers and phones in daily life, as discussed in our 2012 look at smartphones and computers. Start with one important page, test it carefully and improve the design based on what visitors actually need.
Sources: Ethan Marcotte, “Responsive Web Design,” A List Apart, 25 May 2010 · W3C Media Queries Level 3 Recommendation, 19 June 2012

