PDA

View Full Version : Creating websites that are mobile friendly



N1LAF
04-06-2010, 05:46 PM
Since I have been tooling around with this new iPod, I wanted to create Reference pages and place on this device. My earlier works have been disappointing because the website output is so small, and constantly have to resize the screen manually to read. Today I was going to do something about it, and now I will share my discovery with everyone here, who may want to do the same thing.

Works well with my iPod and desktop, and will be trying it on my cell phone.

Sample mobile page: http://www.hamisland.net/css_reference.html

The code that makes this work well is this:



<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"http://www.wapforum.org/DTD/xhtml-mobile10.dtd" >

<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>CSS Reference</title>
...."rest of html code"....


Font sizes I have been using is 14, 16, and 18 pt

KC2UGV
04-06-2010, 06:21 PM
IMHO, instead of specifying px, I'd use em. Let's the user control their experience better. But, just a preference for me.

N1LAF
04-06-2010, 06:41 PM
IMHO, instead of specifying px, I'd use em. Let's the user control their experience better. But, just a preference for me.

Good advice, I haven't dealt with em, so I took the path of least resistance. But I will look at em in the near future.

ka8ncr
04-25-2010, 10:34 AM
IMHO, instead of specifying px, I'd use em. Let's the user control their experience better. But, just a preference for me.

It will save you from having to redo a lot of work covering for the behavioral tics of various mobile browsers. For everything else, the rule I use is that if the page can be scaled, use em.

The other recommendation is that if you sniff for a mobile browser and throw them to the mobile version, you must provide a way for them to get to the normal site easily and let them stay there.