2

I have a small html pages with lot of hyper links, when i view the same page is web browser on a computer that looks okay, when i view that html page in iphone, the letters are very tiny & very difficult to read.

How to make that the same HTML looks auto sized if you view in iphone & web browsers in computers?

Thanks.

Sharpeye500
  • 8,775
  • 25
  • 95
  • 143

1 Answers1

0

You have to make a mobile css.

Use Mobile Device Detect php code as :

require_once('mobile_device_detect/mobile_device_detect.php');

$mobile = mobile_device_detect(true,false,true,true,true,true,true,false,false);

echo ($mobile) ? '<link rel="stylesheet" media="all" href="css/mobile.css" /><meta content="True" name="HandheldFriendly" /><meta content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" name="viewport" />' : '<link rel="stylesheet" media="all" href="css/main.css" />';

echo '<body'.($mobile ? 'onload="window.scrollTo(0, 1)"' : null).'>' ;
GG.
  • 21,083
  • 14
  • 84
  • 130
  • Thanks.Can't it be done @ HTML level, i don't use php in my project. – Sharpeye500 Mar 17 '11 at 00:22
  • It's impossible, and [javascript is not advisable](http://stackoverflow.com/questions/743129/mobile-detection-using-javascript/743139#743139) – GG. Mar 17 '11 at 01:09