2

I'm using the following media query in my css:

@media screen and (max-device-width: 480px) {}

This looks fine on my older iphone 3g ... but when I change orientation from portrait to landscape.. it blows up.. way too big, way too wide.

I've tried this:

@media only screen and (min-device-width : 320px) and (max-device-width : 480px {}

Didn't help.

Any suggestions?

I would rather NOT put in a landscape specific query - I would like a generic one if possible.

(and Yes pinching the screen down kinda works.. but is not the user experience I am looking for.)

Thanks JD

Sean Patrick Floyd
  • 292,901
  • 67
  • 465
  • 588
JDS
  • 81
  • 1
  • 5

1 Answers1

0

Do you have a meta viewport tag? If not, you can use the following to tell the iPhone to report its viewport width as the width of the screen in px:

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

By default, the iPhone reports a width of 980px.

user805804
  • 191
  • 3