4

Working good with iPad but not iPhone

Any code can I direction to iPad and iPhone

for iPad

<meta name="viewport" content="width=1040px, minimum-scale=0.5, maximum-scale=1.0" />

for iPhone

<meta name="viewport" content="width=440px, minimum-scale=0.5, maximum-scale=1.0" />
MPelletier
  • 16,256
  • 15
  • 86
  • 137
l2aelba
  • 21,591
  • 22
  • 102
  • 138

1 Answers1

6

iPhone max-width is 480px not 440px

<meta name = "viewport" content = "user-scalable=no, width=device-width"/>

<meta name="apple-mobile-web-app-capable" content="yes"/>

This sets the viewpoint with the scaleable option off

<link media="only screen and (device-width: 768px)" rel="stylesheet" href="css/ipad.css" type="text/css" title="no title"/>

This is a css file for only iPad

<link media="only screen and (max-device-width: 480px)" rel="stylesheet" href="css/small-device.css" type="text/css" title="no title"/>

This is a css file for only iPhone

They are conditional comments so they will only apply to specific devices with specified max-widths.

Chris Ryer
  • 101
  • 1
  • 4