views:

284

answers:

2

Hi

Which font and which font-size unit is recomended for developing web sites for smartphones? With smartphone I mean a device with a good web browser.

I am not sure to go with px, em or %

Thanks for sugestions and tips.

regards bob

+2  A: 

I would use the CSS medium, large, small, x-large, etc... since the browser will know the user's preference and won't be limited to a fixed size.

Ben S
A: 

If you are mostly displaying lots of text for the user to read, do as Ben S wrote. Either the browser will be preset with good sizes for medium/large/small/etc, or the user will have his own preferences. Only override the user's preferences with good reason.

One good reason to override a user's general browser preferences would be if you are creating an interface to a web application. In that case use the biggest font size that is functional. Do you have a way to ask your users? Either use the server logs and tune for the most popular devices (you can probably send a different stylesheet for each), or ask for feedback.

Looking at the CSS spec, the pt unit looks promising, just be sure the browsers you are targeting use it correctly. In other words, test it out on the target device(s) themselves.

John Ferguson