Reputation: 10671
I'm working on coding a mobile-dedicated website (i.e. m.example.com), based on a design with a width of 640px.
How do I go about starting to code a mobile site in terms of:
Which viewport do I go about using? I've seen many arguments online about the differences between:
<meta name="viewport" content="width=device-width, user-scalable=no">
and
<meta name="viewport" content="width=device-width, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
Also, do I set the body width in percentages or set it to a fixed width for mobile, like 320px? How do I take a design that is designed at a width of 640px to properly display at 320px?
Upvotes: 1
Views: 116
Reputation: 303
I would actually just use the following:
I guess that you could still set the width to the device specific width, along with the initial and maximum scales.
Honestly, I don;t think that including user-scalable makes any difference.
I have tested the above on iPhone, Android and Windows Phone and it works like a charm.
Upvotes: 1