Making a mobile only website

Soldato
Joined
31 May 2006
Posts
4,239
Location
127.0.0.1
Hi all

I want to make a website that ONLY works on mobile devices. But I don't know where to start. I thought that simple HTML might look ok but it seems zoomed out by default whereas BBC Mobile etc fills the screen nicely. Here is my code:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
   <HEAD>
      <TITLE>My first HTML document</TITLE>
   </HEAD>
   <BODY>
      <P>Hello world!
   </BODY>
</HTML>

And this is what happens:

example1.jpg


This is what I wanted to happen:

example2.jpg


Where am I going wrong? Thanks in advance
 
If you're just making it from HTML, I'd check out the dotMobi site. There's a validator there called ready.mobi which will guide you through the things you need to do to make your site dotMobi compliant, which means it will render nicely on any device. You can then add your fancy stuff, like jQuery, to control other stuff or add device specific features.

This is the code you need to help control the viewport width:

<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>

Have a look at the source of my mobile site if you want to see some simple example code: http://techpad.co.uk/mobile/
 
Back
Top Bottom