[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2012-03-13
6
Medium Priority
?
1,830 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 30

Expert Comment

by:serialband
ID: 37715756
0
[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

 

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 2000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

How to take pictures with depth using iOS 10
Article by: Justin
In light of the WannaCry ransomware attack that affected millions of Windows machines, you might wonder if your Mac needs protecting. Yes, it does and here is how to do it.
Users will learn how resize a batch of photos from a single command in Photoshop via Photoshop's Image Processor. Open up an Image you'd like to resize in Adobe Photoshop: Adjust the image size according to your preferences. Image > Adjustments > …
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.

649 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