Force Desktop View on Mobile Portrait Mode

1 replies
  • WEB DESIGN
  • |
Hi all,

I'm currently in the middle of designing a new landing page:

Internet Marketing Services in London - Employ the Internet

It looks good on desktops and iPads, but horrible on iPhone 6+ and below when on Portrait mode.

Is there a way I can force desktop view when visitors come to this page (and this page only) while on Portrait mode? Any help would be greatly appreciated. Thanks!
#desktop #force #mobile #mode #portrait #view
  • Profile picture of the author geekSoftware
    I needed something like that on my Kindle Books Promotion website. So what I did? I figured out that best way will be to do it using jQuery (it's possible with CSS too). Here is quick example:

    HTML Code:
    function resizeDocument() {
            if (screen.width >= 375 && screen.width <= 414) {   //iphone 6 and iphone 6 plus
                    //set CSS for desktop
            } else {
                    //set CSS for mobile
            }
    }
    
    $(document).ready(function() {
            resizeDocument();
            $(window).resize(function() {
                    resizeDocument();
            });
    });
    Also, as I said, you can do it in CSS, something like this:

    HTML Code:
    <style type="text/css">
            @media screen and (min-width:375px) and (max-width:414px){
     	 	//set CSS for desktop
            }
    </style>
    {{ DiscussionBoard.errors[9766140].message }}

Trending Topics