08-31-2011 11:10 AM
In the app i'm making i have a <div> of a fixed height. User inputs make the list in the div longer and eventually it will go beyond the bottom border. In my CSS i have the overflow set to auto so that when the list is longer than the div the scrollbars will show. This works in all browsers but not on the playbook. The div is userscrollable but i'm afraid that the user won't know to scroll since the bars don't appear. I tried many different options and nothing makes the bars appear on the playbook. Anyone know what the trick is here?
Solved! Go to Solution.
08-31-2011 11:54 AM
08-31-2011 12:29 PM
One comment about using a JavaScript toolkit like iScroll or others.... using one of these toolkits will slow down the scrolling of the div since the toolkit animates the scroll using JavaScript and CSS.
The native scrolling of <div>'s and the body content is hardware accelerated and very smooth with inertial effects.
By adding a scrolling JavaScript toolkit you may get scroll bars drawn, but it could drastically reduce your scrolling speed and smoothness.
08-31-2011 03:04 PM
08-31-2011 03:30 PM - edited 08-31-2011 03:31 PM
Unfortunately I don't think there is any way to force the scroll bars to appear on a div unless you draw in some fake ones.
Another thought would be to draw a "down" arrow in the div to indicate there's scrollable content.
09-01-2011 01:06 PM
Thanks. It's good to know that this isn't possible and that I have to look for an alternate solution. It sucks that you can't force scroll bars to appear however.
My solution is to have a msg pop up when the div goes longer than the lower limit.
09-03-2011 11:30 PM
After tneil advised me to ditch iScroll and use the native kinetic scrolling built into WebWorks, I had a related issue to this - I had DIVs with overflow but no visible scrollbar.
My solution: Adding a custom scrollbar for WebKit browsers as described here:
http://css-tricks.com/9130-custom-scrollbars-in-we
My specific implementation is encapsulated in this GitHub commit:
09-04-2011 08:32 AM
Very cool... the webkit CSS styling of scroll bars is news to me ![]()
09-05-2011 12:40 AM
This is great news, thanks ![]()
09-05-2011 09:48 PM
Thank you very much! This is excellent and it works! There are so many new and good things that CSS3 has to offer.