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

Control the BlackBerry Browser zoom level

by Retired on ‎02-17-2010 11:09 AM - edited on ‎04-19-2011 01:06 PM by Retired (8,326 Views)

Summary

This article applies to the following:

  • BlackBerry® Device Software 4.6 and later

 



Details

The BlackBerry® Browser supports the HandheldFriendly and viewport meta values to help control the presentation of your content on the BlackBerry smartphone screen. In BlackBerry Device Software 4.6 and later, content is rendered in Page view by default. Page view renders pages on a 1024 x 768 pixel canvas appropriate for displaying most content and fits the content to screen size. If you have designed your content for the BlackBerry Browser, include the name="HandheldFriendly" attribute to prevent the BlackBerry Browser from zooming on the content. The following is an example of the HandheldFriendly attribute:

 

<meta name="HandheldFriendly" content="true" />

 
The viewport meta tag can also be used to provide more granular control over zooming. The BlackBerry Browser supports the following viewport meta tag properties:


Property  Description 
width Defines the width of the viewport in pixels. The default value is 1024. The range is from 1 to 10,000. The constants "device-width" and "device-height" can also be used to specify the screen width or height of the BlackBerry smartphone.
initial-scale Defines the initial zoom level. The range can be from 0 to 1.
user-scalable Configures whether a BlackBerry smartphone user can change the zoom level. The value can be either yes or no.

The following is an example of the viewport meta tag:

<meta name = "viewport" content="width=device-width,user-scalable=no" /> 
Users Online
Currently online: 69 members 523 guests
Please welcome our newest community members: