Reputation: 31893
So I am creating my first webpage catered to mobile browsers. What are some things to consider?
How do I get the resolution right for different devices (Blackberries, iPhones, iPads, etc.)? Is there a common method that people are using? Some sort of framework?
How do I prevent zooming (on most touch screen phones, you can zoom in by pinching)?
What are some other things to keep in mind?
Upvotes: 4
Views: 383
Reputation: 34855
There are a ton of good practices to follow. Here are a few:
width
flexible (100% or close to it) so that it expands to fill the screen Do not make people horizontally scroll the page.css
, add extra line-height
for easier reading.css
, add extra letter-spacing
between numbers in phone numbers, for easier reading.a hrefs
so that it is easier to click/touch a link.HTML5 form types
so that modern browsers will use the appropriate keyboards... http://diveintohtml5.ep.io/forms.html Upvotes: 5
Reputation: 536379
Just create normal web pages with liquid layout and let the browser take care of choosing an appropriate width.
If you know your pages will scale down nicely to mobile screen sizes, give the browser a clue that it can show the pages 1:1 without zooming by default. Include in your <head>
:
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
I would strongly recommend not attempting to disable zooming (user-scalable=no
) as it's a useful feature that you gain nothing by blocking.
Upvotes: 3