tags:

views:

119

answers:

3

the vertical iPhone viewport width is 320 px, but what is the width in ems

or

what is the default font size in px in the iphone

A: 

320px = 20ems. I think the default size is 12px; it's set to "Medium", which in most cases is 12px.

qwertypants
An em is based off the point size of the font. 320px will be 20ems only if the font is a 16 point font.
ceejayoz
+1  A: 

Does this help? http://www.evotech.net/blog/2007/07/web-development-for-the-iphone/

But maybe you can use a variation of this: http://www.everythingicafe.com/forum/iphone-software/increase-font-size-in-safari-without-zooming-9511.html

to set a font size that stays the same, which would answer your question.

George Sisco
+1  A: 

I did a test with the viewport set to the iphone width:

<meta name="viewport" content="width=device-width" />

and...

<span style="font-size:16px">A</span>

is the same size as

<span style="font-size:1em">A</span>

both in the vertical and horizontal orientation

Victor P