Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6746437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:19:22+00:00 2026-05-26T12:19:22+00:00

I have a html page optimized for portrait view on different devices. Normally the

  • 0

I have a html page optimized for portrait view on different devices. Normally the page should automatically scale to device width when switching to landscape mode with this meta tag:

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.6, user-scalable=no;"/>

Works fine on iOS but doesn’t work at all on My Milestone and a Nexus One. The page just stays at it is at 320px width, like it is meant to be in portrait view. Also changing the width or initial scale in the viewport meta tag to a certain value doesn’t have any effect as it should have according to the official android documentation.
I also tried to make a simple page for testing purposes but it didn’t work. The only chance to make the browser changing the scale is to avoid the viewport meta tag completely, but then it seems to scale randomly, mostly to a very small scale.

Here is a very simple test page: click

Maybe someone came across this behavior. I couldn’t find a solution in hours…

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:19:22+00:00Added an answer on May 26, 2026 at 12:19 pm

    During a new Project I made some more research on this topic and found a solution. Its doing what in my opinion Android Browser should do by himself.

    First check the screen resolution (width) and then zoom the site by JavaScript code.
    I mostly build my projects with JQuery so I used some of its functions.

    Check width of screen:

    newWidth = $(window).width();
    

    You can also use native Javascript (DOM) functions to get the width avoiding JQuery. Something like window.width or innerwidth. Don’t know by heart.

    Calculate the zoom-level by dividing the actual width of the screen with your page size:

    zoomlevel = newWidth/defaultWidth;
    

    Then adjust the zoom level of the screen:

    document.getElementById("wrapper").style.zoom = zoomlevel;
    document.getElementById("wrapper").style.MozTransform = 'scale('+zoomlevel+')';
    

    “wrapper” of course is a div around the whole page. The MozTransform isn’t needed if you want to support native browsers only and makes your page look a bit odd, when testing in Firefox.

    Call this code when the browser window resizes:

     $(window).resize(function() { CODE });
    

    Natively I guess you can use an onResize event.

    This works fine in Andoid-Browser, Mobile Safari and on BlackBerry devices with OS 6+. Couldn’t test it on a Windows mobile yet.

    As I mentioned obove in the end this is just, what I expected the mobile browsers would do anyway, but didn’t do, besides Safari of course.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have HTML page where windows media player is embedded. It works very well
I have HTML page with some HTML element with ID=logo . I need to
How to find all files in directory? I have HTML page in some directory.
I have an HTML page (say welcome.html) which contains an iframe to a page
I have a HTML page that scrolls up and down (not a lot, but
I have a HTML page with which I want to do some client side
We have an HTML page which displays a bunch of pretty bars using divs
I have a HTML page, with html-mode enabled. I call function sgml-validate to check
I have an HTML page that uses AJAX to retrieve messages from a server.
I have an HTML page (it's out of an internal address book application) and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.