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
Trusted Contributor
zahirw
Posts: 134
Registered: ‎04-15-2012
My Carrier: Vodafone

Correct Resolutions for layout

I'm building an app that runs on 3 resolutions

  1. 640x480
  2. 480x320
  3. 320x240

 

I'll be using media queries to swap out the style sheet based on the screen size. I'm starting with 640x480 and scaling lower towards 320x240.

  

When I build the html, build it using fuild layouts with a minimum of 640 as the width in the artwork psd but using 100% as the width in the html. 

  

When I run the 640x480 build on ripple, it appears fine, on the phone(9900) when I test on the browser, there is a horizontal scroll. On investigating further, it seems the innerwidth of the browser on the 9900 is only 356.

 

I'm confused as to whether the layout artwork should be with a basic resolution width for this particular resolution, 640 or 356?

Please use plain text.
Trusted Contributor
zahirw
Posts: 134
Registered: ‎04-15-2012
My Carrier: Vodafone

Re: Correct Resolutions for layout

Quick update :

 

After removing the follwiong line from the html

<meta name="viewport" content="user-scalable=no,initial-scale=1.0">

 the layout now fits perfect on both the 9900 and the 9700.

 

So the question is, should we be designing layouts with 640 as the width or 356?

Please use plain text.
Trusted Contributor
zahirw
Posts: 134
Registered: ‎04-15-2012
My Carrier: Vodafone

Re: Correct Resolutions for layout

Any clue on this?

Please use plain text.
Developer
Pumano-
Posts: 215
Registered: ‎11-05-2011
My Carrier: Beeline

Re: Correct Resolutions for layout

i seen that bug too!

Please use plain text.
Trusted Contributor
zahirw
Posts: 134
Registered: ‎04-15-2012
My Carrier: Vodafone

Re: Correct Resolutions for layout

So what's the best resolution to design for? 640 or 356?
Please use plain text.
Trusted Contributor
zahirw
Posts: 134
Registered: ‎04-15-2012
My Carrier: Vodafone

Re: Correct Resolutions for layout

Please use plain text.
Administrator
astanley
Posts: 1,359
Registered: ‎07-02-2009
My Carrier: Bell

Re: Correct Resolutions for layout

>>So the question is, should we be designing layouts with 640 as the width or 356?

 

It has to do with the increased screen resolution of the 9900.  Add "target density" to your viewport and the web engine will identify the actual screen width correctly:

 

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



 


Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Trusted Contributor
zahirw
Posts: 134
Registered: ‎04-15-2012
My Carrier: Vodafone

Re: Correct Resolutions for layout

Yep, that's what I did. Thanks :smileyhappy:
Please use plain text.
Developer
Pumano-
Posts: 215
Registered: ‎11-05-2011
My Carrier: Beeline

Re: Correct Resolutions for layout

Yes, thanks, it's solved that problem.
Please use plain text.