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

Posts: 466
Registered: ‎04-11-2012
My Device: Bold 9900
My Carrier: Rogers

CSS Question - Scrolling

I want to do this 


(say below is screen between my line of equal signs)



     title (which is fixed at top)


content whcih can scroll but 

self adjust depending on device-height

which may vary for variety of ww devices





I know i can do this via css/divs and to set the div property overflow to scroll but how would i set the height so it would work for all devices. For example if title is 50px, is it possible to do put into CSS to set the height of that div to be device-height - 50 px or something along the lines? I am sure there must be simple solution to this!



Developer for easyDial for BlackBerry Bold & inLink for BlackBerry PlayBook
Find me online via twitter, or on the techfruits.com webpage. Please hit the like button below if what I said helped!
BlackBerry Development Advisor
Posts: 769
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: CSS Question - Scrolling

I've done this in the past myself.


I'm not sure if it's the BEST way or not, but worked for me.  I would use JavaScript to do exactly this.  I was using jQuery, but the technique will be the same.



function setHeight () {
    $('#divID').height( window.innerHeight - 100 );