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 540x960 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 540x960, 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!