Developing for the mobile web – size

This is an update to a previous blog post of mine that has now been updated (https://raypastore.com/wordpress/2011/05/developing-a-website-for-the-mobile-web/)

So when developing a website for the mobile web we need to take into consideration the screen’s size. Obviously since we develop on a computer we need to test a lot to make sure our page looks right on the mobile device. So here are a few quick tips which are updated from my previous post:

1. Most phones compress the page (display) 980 pixels in width. That means that a page that is 980 pixels on a browser (desktop) will be compressed to the fit the phone. However, that is not always the case so we add this line of code:

2. The line of code, which is placed in the header (<head>):

<meta name=”viewport” content=”width=780″>

Will make the page compress to 100% of the phones width (a %) rather than a strict defined width. This is a good option for those developing for multiple devices which is usually the case when developing for the mobile web…otherwise you would just develop an app.