background preloader

ORIENTATION

Facebook Twitter

Detect and Set the iPhone & iPad's Viewport Orientation Using JavaScript, CSS and Meta Tags. Last week we showed you how to use Safari for iPhone and iPad website testing.

Detect and Set the iPhone & iPad's Viewport Orientation Using JavaScript, CSS and Meta Tags

This week we'll show you how to detect and set the devices' viewport orientation to Landscape or Portrait using JavaScript, CSS and meta tags. Developing websites for the iPhone and iPad is a bit different than developing a website for a standard, desktop web browser. When you are viewing a site using an iPhone, for instance, if you are holding the device upright, you will see the page in portrait view. If, however, you turn the device sideways, the view of the web page changes to landscape view. That is, if you have properly designed your website. Iphone - Disable auto-rotate in Jquery Mobile or PhoneGap.