cyberfly cyberfly - 1 year ago 63
CSS Question

Designing website for iphone

I am coding a website for iphone. Our designer pass me the image with size of 320 x 480 so i code the web also based on that size. However when i preview in my iphone, the website look very small. How to fix this problem?

My container size is 320px.

Thanks.

Answer Source

Try this on the top of the

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
...and on your body

<div style="width: 320px; margin: 0 auto;"> 
<!--some code here-->
</div>

Then you can test it at http://testiphone.com/...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download