Rules

Secret ingredients to quality software

Edit
Info

Do you set device width when designing responsive web applications?

Last updated by Tiago Araujo on 27 Jun 2014 06:38 pm (almost 7 years ago) See History

When designing a responsive website, you need to make sure that the browser understands how to correctly render your website. Device-Width informs the browser what the size of the viewport should be.

Since we want our website to render corectly for all screen sizes, we specify that it should set the viewport to the size of the device's screen.

<meta name="viewport" content="width=device-width" />

This ensures the browser always renders at the correct resolution for the device.

Ben CullBen Cull

We open source. This page is on GitHub