Factolex On iPod Touch & iPhone (+Tutorial)
November 4th, 2007 by Nader
factolex is working on the iPod Touch and iPhone by design. With an em-based stylesheet and a small additional CSS-file for mobile devices, it’s pretty easy to get it working.
Got an iDevice? Surf to factolex.com and enjoy the knowledge :-)
How to make your website work on a mobile device
- Use an EM-based stylesheet (not pixels)
- Insert this meta definition in your header
<meta name="viewport" content="width=device-width" /> - Create a routine to check for the browser.
For example, in PHP you can gather valuable information by reading$_SERVER['HTTP_USER_AGENT'] - If browser agent is iphone or other, insert a custom stylesheet that tells the browser to hide or rearrange divs. In our case moving the sidebar to the bottom, floating the login area to the right of the logo, etc.
