Jump to content

adapting sites for mobile phones


real_illusions

Recommended Posts

Hi there.how do you go about adapting websites for mobile phone and other small hand held devices??i had a quick look on google, and it didn't give me much info on how to do it.although i did find, that the best way is to leave out - jpegstablesframesjavascriptflashbackground colours and imagesstylesheetsso..basically anything fancy and to reduce the page to text only. and also a smaller page as mobile phones and such things tend to be a bit smaller than computer monitors.:)

Link to comment
Share on other sites

Everything you said is true besides the stylesheet thing. Every modern phone which has support for XHTML also has support for CSS(1...I'm not sure about 2 though). Infact if you look at the CSS tutorial on w3schools you'll see it's possible to make another stylesheet especially for mobile phones OR keep everything in a single stylesheet and separate the PC presentation and the Cell phone presentation like this:

@media screen---CSS for PCs goes here---@media handheld---CSS for Mobile phones goes here---

Using relative values is also something to consider. The page will automatically be resized for the requred device if relative values are used.

Link to comment
Share on other sites

Have you looked at the WAP / WML Tutorial?http://www.w3schools.com/wap/default.asp

i never noticed that before.however, i would want to use css to make the pages, instead of making 2 different sites and therefore taking up un-nessesesscscesary space on the server.
Link to comment
Share on other sites

Even the latest web phones, like the Treo, only have a color screen resolution of 320x320. This means that it will be very hard to create a one size fits all site - especially with CSS.Since phone browsers still vary so much, its best to program in WML and that will require a seperate set of pages. However, if you are approaching things correctly and you plan everything well, Server Side Includes (SSI) can save your day.For example, the site I recently built had to accommodate regular web browsers and phone browsers so this is what I did. First, I sniffed the browser type and set a session variable that tells me if I am on a mobile device or regular web. From that, all my SSI files were dynamically determined based on the first session variable. Each of those SSI files was coded twice, once for regular web and once for phone - with this client I was lucky since it was a appliation specifically design fro salesmaen in the field - not general public - so I could program for one phone, the Treo 6500. And my content - which I had to pay very close attention to - was using same application (dynamic or static) for both.So everything, including DOC TYPE was part of my header SSI.Again, it takes planning, good planning. The amount of time you alot for planning should be equal to the alotted time for development. If you follow this rule of thumb, you'll be ok.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...