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
Ohope5
Posts: 12
Registered: ‎12-18-2012
My Device: Developer
My Carrier: O2
Accepted Solution

Screen size formatting

I am writing an app for BB OS 6/7 and am not sure how I should write the CSS. I originally wrote it all using % sizing which I quickly discovered simply does not work. Now I have re-written it using px. However, I am stuck as I know that different Blackberry phones have different screen sizes. What should I do about this? Write multiple CSS files?
I would be grateful for any help. Thank You in advance.
Please use plain text.
Developer
TheFlowFX
Posts: 166
Registered: ‎02-15-2012
My Device: Playbook 16GB
My Carrier: Bags are useful

Re: Screen size formatting

Have you tried using this?

 

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

 

If any post helps you please click the Like Button below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!

Please use plain text.
Contributor
Ohope5
Posts: 12
Registered: ‎12-18-2012
My Device: Developer
My Carrier: O2

Re: Screen size formatting

Do you mean to use with the % or px?
Please use plain text.
Developer
TheFlowFX
Posts: 166
Registered: ‎02-15-2012
My Device: Playbook 16GB
My Carrier: Bags are useful

Re: Screen size formatting

That code should be between your head tags. If your going to use css for certain classes, you shouldnt have to use px or %. 

 

Have a look at this:

Device width

If any post helps you please click the Like Button below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!

Please use plain text.
Contributor
Ohope5
Posts: 12
Registered: ‎12-18-2012
My Device: Developer
My Carrier: O2

Re: Screen size formatting

Oh right, I understand now. Thanks, I'm completely new to this, so that was a great help.
Please use plain text.