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 8558781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:53:23+00:00 2026-06-11T15:53:23+00:00

I have a div element on a page not formatted to mobile. I do

  • 0

I have a div element on a page not formatted to mobile. I do not want to format this page to be mobile friendly though. When clicked, the div expands to the size of the mobile device. This works when the div is on a blank page, but it does not work when the div is on a page full of content. I’ve tried to use multiple ways to detect the screen or window height/width and it never scales correctly. What I think is happening is that:

The div detects the pixel width and height of the device correctly – so for a Droid Razr Maxx it detects 540×960 in portrait. Because this is a non-mobile site, the website is formatted to a zoomed out view. I don’t want to adjust the zoom mechanics of the actual webpage, so the div is being formatted to 540×960, but relative to the size of the document – not that actual screen.

What I need to do is detect the pixel size of the visible frame, and adjust the div to the size in relation to the screen and not the page. Or I need to detect the size of the page in zoomed out mode – then scale to that?

Unfortunately I can not provide example code at this time.

Can anyone assist with this?

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-06-11T15:53:24+00:00Added an answer on June 11, 2026 at 3:53 pm

    It’s difficult without sample code to know exactly what you are trying to accomplish, but I’ll paraphrase my understanding along with a possible solution.

    It sounds like you have an element that, when clicked, expands to the width of the screen. However, in mobile phones, the screen != page. You want the element to remain only as wide as the screen–regardless of the zoom level.

    If I am understanding this correctly, then it sounds like you might need to create a bit of jQuery (or POJS) that adjusts to the size of the window rather than the size of the page. The window.innerWidth property is updated when the user zooms. You may be able to use this value rather than clientWidth or any similar values.

    Here’s an example of using window.innerWidth to get the zoom level:

    Detect page zoom change with jQuery in Safari

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

Sidebar

Related Questions

I have a DIV element in my page, that I want to resize when
I have a DIV I want to scroll with the page but it's not
I have a problem to load specific div element and show on my page
I have a block element (DIV) who stretches across an entire page. It contains
I have this page that displays pictures in a div. I have jquery cycle
I have one div element at the top of my page that is set
Here's my problem: I have a div element that when it's clicked, another div
I have a page containing the following div element: <div id=myDiv class=myDivClass style=>Some Value</div>
I have a simple html page with a div element in it. The innerHTML
In the middle of my page I have a div element with some content

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.