Javascript: How to keep the app inside the screen, at the correct zoom and with no scroll allowed?
Hello, I've been banging my head with this for a lot of hours, and I'm sure it will be a very trivial thing for someone more Javascript savy than me.
I'm doing a board game in HTML5, but I find problems in rendering it correctly in my cellphone.
Following this tutorial http://forums.andromo.com/discussion/comment/7271 I've tried putting at the beginning of the code:
<meta name="viewport" content="width=device-width, user-scalable=no">
The result is that my app fills the cellphone's width, but the content overflows downwards, so it doesn't fit in the screen, and allows vertical scroll. (Ugly, because I need the whole game to be in a single screen, even if images have to be smaller)
On the other hand, when I don't put this line of code, the app appears initially very tiny, and I can zoom it manually to the right dimensions. I'd like this zooming to be automatic.
Anybody have an idea of what could I be doing wrong? I've tried removing styles, eliminating any width or height in pixels in the code, resizing the images to make them smaller, also using height=device-height instead, and it doesn't make any difference...
I'm doing a board game in HTML5, but I find problems in rendering it correctly in my cellphone.
Following this tutorial http://forums.andromo.com/discussion/comment/7271 I've tried putting at the beginning of the code:
<meta name="viewport" content="width=device-width, user-scalable=no">
The result is that my app fills the cellphone's width, but the content overflows downwards, so it doesn't fit in the screen, and allows vertical scroll. (Ugly, because I need the whole game to be in a single screen, even if images have to be smaller)
On the other hand, when I don't put this line of code, the app appears initially very tiny, and I can zoom it manually to the right dimensions. I'd like this zooming to be automatic.
Anybody have an idea of what could I be doing wrong? I've tried removing styles, eliminating any width or height in pixels in the code, resizing the images to make them smaller, also using height=device-height instead, and it doesn't make any difference...