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
New Developer
Posts: 20
Registered: ‎12-27-2009
My Device: Not Specified

Managing HTML elements (position) on varying screen sizes!

Hello All,

 

I have been designing a few HTML pages which consist of buttons, images and some content (text). My target version in browser v4.5 but when I am viewing the same pages on different browsers (rather different screen sizes like v4.6) then the elements are displaced.

 

Best example should be this:

I used 4 radio buttons on a page....I placed them in a div at a certain position using padding properties on v4.5. When I view the same page on v4.6 browser, all the radio buttons are displaced and that's happening because radio buttons are altogether different on v4.6 browser. They are some what bigger in sizes.....because of which all the elements on page are displaced.

 

Can some body tell me who basics follow so as all the elements are intact, they do not loose their x/y co-ordinates when viewed on bigger screen sizes ?

 

I understand this is to do with general HTML standard....but if some body who has done such thing on blackberry devices, please help me!

As ever,
Vinayak Kadam
Developer
Posts: 189
Registered: ‎08-13-2008
My Device: Not Specified

Re: Managing HTML elements (position) on varying screen sizes!

Hello Vinayak Kadam

 

From my own experience, in order to get different versions of the BB browser to display elements in any kind of structured way between versions I use TABLES.

 

I would love to hear other peoples views on this.

 

To get v4.3, v4.5, v4.6 and above to display element positions in a similar manner, I have found very hard!

 

Am really loving v5 and only wish every BB had it ;-)

 

Cheers

 

Andrew

New Developer
Posts: 20
Registered: ‎12-27-2009
My Device: Not Specified

Re: Managing HTML elements (position) on varying screen sizes!

Hey Andrew,

 

Thanks for your inputs. They certainly add the value to this thread.

 

In between is there somebody out here who can actually explain me the basics of positioning HTML elements in v4.5 and v4.6 browsers such that they do not change their positions when viewed on varying screen sizes!

 

As ever,
Vinayak Kadam
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Managing HTML elements (position) on varying screen sizes!

Hi Vinayak,

 

In 4.5 it is much more difficult than in 4.6.  In 4.5 there really isn't any positional CSS available and table sizing support is limited.

 

In 4.6 you can do much more with CSS positioning and table sizes.  The most common approach is to determine on the web server what model of device, OS version and screen size is being used and to produce a web page that matches the needs of the browser.  

 

In some cases your CSS positioning and table percentages will get you most of the way with content that will fit different screen sizes.  But there will be some cases where you will need to target the content based on the device attributes.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Highlighted
New Developer
Posts: 20
Registered: ‎12-27-2009
My Device: Not Specified

Re: Managing HTML elements (position) on varying screen sizes!

Hey Tim,

 

Thanks a lot for this quick reply. This is definetly helpful.

As ever,
Vinayak Kadam