Click here to Skip to main content
15,742,357 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In a 'div' element, I defined the ContentPane's style as below:
<div id="rightPane" dojotype="dijit.layout.ContentPane" style="width: 250px; overflow-x:scroll; overflow-y:scroll;" region="right">

But the vertical scrollbar (where overflow-y:scroll or overflow-y:auto) does not function as needed. There are 2 bugs:
1) If the items in the panel are not expanded, I want to the scrollbar in 'hidden' status. But it is always on even though I set overflow-y:auto.
2) When the items are expanded, the scrollbar still behaves like it before, and can't be scrolled down.
I need a script to dynamically change the scrollbar status. Hopefully you can help me for this piece of code. Thanks in advance.
Richard Deeming 13-Nov-14 9:34am    
"even though I set overflow-y:auto"

Which is it? You say you've set it to "auto", but your code shows you've set it to "scroll".
s yu 13-Nov-14 11:26am    
I tried both: overflow-y:auto and overflow-y:scoll. Same appearance.

1 solution

It is a sample code i have worked,It works fine

<div id="scroll">
    <p>Try to add more text</p>
here's the css code

#scroll {
   border:1px solid black;
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900