DesignIt
02-20-2007, 03:00 PM
I have two site versions, one being designed for handhelds.
Is there javascript/css to detect if a user is on a handheld?
chris_bcn
02-20-2007, 04:24 PM
Handhelds is a triky area. Some PDAs will honour the media="handheld" but many won't, so you can't use that as a reliable guide. Some PDA browsers will resize the page for you, again, most won't
In my experience you are left with various options -
try to define the most likely handhelds - I did a project for Nokia recently, so that made life easier.
Generally the screen widht is between 200 - 240px. You could use JS to dectect screen size and serve up a differeent stylesheet for each range - however many PDAs don't have JS support - you could also try this with PHP.
Often though, I have found the easiest way is to serve up a different page iwth no styling. Afterall content is by far the most important aspect - especially as many people are paying by the byte for downloads
Check Cameron Molls site - he has lots of info on designing for handhelds - www.cameronmoll.com (http://www.cameronmol.com)