Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
Posts: 21
Registered: ‎10-28-2011
My Device: Bold 9700
My Carrier: Turkcell
Accepted Solution

Viewport Problem

Hi!

 

I have 2 html file. These two files exactly have same meta data of viewport however second page (lets say second.xml is okey but index.html looks like scaled to 0.5

 

html tag is:

<meta name="viewport" content="width=device-width,target-densitydpi=device-dpi,user-scalable=no,initial-scale=1.0">

 

And also, In order to make them fullscreen I use:

 

document.body.style.height = screen.height + 'px';
document.body.style.width = screen.width + 'px';

 

second.xml is okey but again I have problem with index.html, that is it cannot be fullscreen. I put an alert() below of this code in both file, both of them (tried in Blackberry 9700 emulator) give me the same result: 240px,320px

 

Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: Viewport Problem

did u checked with height=device-height.

Contributor
Posts: 21
Registered: ‎10-28-2011
My Device: Bold 9700
My Carrier: Turkcell

Re: Viewport Problem

same Smiley Sad

Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: Viewport Problem

add this and check..............

document.body.style.height = screen.height;

Contributor
Posts: 21
Registered: ‎10-28-2011
My Device: Bold 9700
My Carrier: Turkcell

Re: Viewport Problem

There is a <table> in the page and since it couldn't fit the area, it some how changes the scale.