-1

Hi there i created a responsive mobile website using this:

max-width(480px) {etc..} 

+

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">  

For every mobile device the website looks the same => great.

But when i change to landscape there is more than 480px and the website-variation of the desktop displays.

Is there any possibility to disable the auto-rotate or to show the portrait-mode on mobile-device even if there is more than 480px?

Greetings

user3683881
  • 93
  • 1
  • 2
  • 10

2 Answers2

2

You can try and target specific orientation with your media query:

@media max-width(600px) and (orientation: landscape) {
    rules for landscaped devices...
}

More on media queries:

https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries

Josh KG
  • 5,050
  • 3
  • 20
  • 24
0

Change your media query to a higher value?

max-width(600px) {etc..}
Steve Sanders
  • 8,444
  • 2
  • 30
  • 32
  • yea i thought about it, but using this i could catch tablet´s etc you know? – user3683881 Jul 02 '14 at 15:39
  • This is really your only option. There are thousands of possible device sizes, you have to draw the line somewhere. For example, the Samsung Galaxy Note 3 phone reports a width of 540px in portrait mode. Right now, they would be seeing the desktop version of your site. – Steve Sanders Jul 02 '14 at 15:44