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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Posts: 45
Registered: ‎05-01-2013
My Device: Z10
My Carrier: LIME
Accepted Solution

Z10 and Q10 Screen Sizing.

Hi guys, I have successfully made my first HTML5 game for BB10.  However, I want this to support the Q10 as well, can anyone assisit me please in how to do such?

Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: Z10 and Q10 Screen Sizing.

It depends where you need adjustements but here are some useful tips:


1. In javascript you can get the screen size using the following properties to update dynamic DOM elements:

- screen.width &  screen.height


2. Using CSS a media query can be done to update your style content:


- @media screen and (device-height:720px) and (device-width:720px) {



You can play around with these properties a bit. If you would like the actual innerHeight/innerWidth which can be useful in the case where you are ever invoked inside another applicatoin use the following in JS: window.innerHeight and window.innerWidth.

Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Z10 and Q10 Screen Sizing.

@spikegotti: Did Erik's response answer your question? If so please accept that thread as the solution.

As Erik noted, CSS media queries are a great way to style based on specific device properties.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Posts: 45
Registered: ‎05-01-2013
My Device: Z10
My Carrier: LIME

Re: Z10 and Q10 Screen Sizing.

Thank you very much Smiley Happy It worked...