Solved

Can You Force iPhone's Safari Into Landscape Mode...?

Posted on 2012-03-13
6
1,785 Views
Last Modified: 2012-03-13
Hello Everyone,
  Thanks for taking a look at my question. So, I'm the web designer for a small company and I'm currently developing (and close to launching) a mobile website for our company. However the text gets cut over, and returned putting complete sentences on three lines and things like that. So I was wondering if there is a way that I can force Safari into landscape mode so the user will turn their phone and see everything properly?

Much Thanks,
  Jason Eyerly
0
Comment
Question by:CaptainNegatory
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:Paul-B
ID: 37715651
0
 

Author Comment

by:CaptainNegatory
ID: 37715675
No this will not work. I need the users browser to lock itself in landscape mode, not my own phone.
0
 
LVL 29

Expert Comment

by:serialband
ID: 37715756
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:CaptainNegatory
ID: 37715843
These will also not work. I'm just building a webpage, and I need Safari to rotate to landscape mode. This has nothing to do with any apps, or C++.
0
 
LVL 4

Accepted Solution

by:
Paul-B earned 500 total points
ID: 37717103
Sorry about that, basically the answer is no.. but you could rotate your content with CSS on orientation change.. something like ...

$(document).ready(function () {
     $(window)    
          .bind('rotateContent', function(){
               if (window.orientation % 180 == 0){
                   $(document.body).css("-webkit-transform-origin", "")
                       .css("-webkit-transform", "");               
               } 
               else {                   
                   if ( window.orientation > 0) { 
                     $(document.body).css("-webkit-transform-origin", "980px 460px")
                       .css("-webkit-transform",  "rotate(-90deg)");  
                   }
                   else {
                     $(document.body).css("-webkit-transform-origin", "460px 980px")
                       .css("-webkit-transform",  "rotate(90deg)"); 
                   }
               }
           })
          .trigger('rotateContent'); 
  }

Open in new window

0
 

Author Closing Comment

by:CaptainNegatory
ID: 37717169
Thanks! I was able to make this work sufficiently enough for our needs!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CocoaPods is the best way to manage library dependencies in iOS and OS X projects. By using cocoa pods there is no need of downloading the code from github and copying to your project. There are plenty of open source libraries now available with C…
Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
Users will learn how to set proper sequence settings, scale images, paste attributes, add transitions, fades, and music. Open up Final Cut Pro 7 and Create a new Project: Set the Sequence Settings. a) Click File > Easy Setup > Format > Apple ProRe…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question