rjjonker
rjjonker

Reputation: 73

Prevent Safari/iPad to go in landscape mode

I have a website for iPad and I want visitors to see it in portrait only. Is it possible to prevent Safari/iPad to go in landscape mode?

Thanks in advance for your replies.

Cheers, Robert

Upvotes: 0

Views: 757

Answers (2)

Fresheyeball
Fresheyeball

Reputation: 30035

Everyone says you can't do this, but you can hackity hack it. I do not advise unless you really have to, but you could use js to detect orientation change, and upon that change use css3 to rotate a full wrapper div 90 degrees ( transform: rotate )

Upvotes: 0

Mathias Bynens
Mathias Bynens

Reputation: 149804

It’s not possible to prevent this. It’s a browser feature, and this cannot be controlled using JavaScript.

Upvotes: 1

Related Questions