Chapter 4: Viewports

To the main book page.

Buy it here Cover of the Mobile Web Handbook

The Mobile Web Handbook by Peter-Paul Koch. Published by Smashing Magazine GmbH.
ISBN 978-3-94454093-1

Peter-Paul Koch
Design and illustrations
Stephen Hay
General editor
Vitaly Friedman
Technical editor
Stephanie Rieger
Copy editor
Owen Gregory
Further editing
Patrick Lauke, Max Firtman, Vasilis van Gemert
Markus Seyfferth

Chapter 4 contains a detailed descriptions of the three mobile viewports, including an explanation why we need them, related JavaScript properties, and what resolution means.


I made a mistake in the em/rem in media queries section. 1em = 1rem = initial font size in pixels, where the initial font size is the one defined by the browser. It’s usually 16px, but users can change it in their preferences. In any case the rem unit in media queries has nothing to do with the font-size you define in your CSS. Full tests pending.

Links and additional information