I would like to style this two scrollbars using a jquery plugin or a JS library.
This is the HTML code:
<div id="container">
<div class="fixedHeightContainer">
<div class="fixedHeightContent">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc ut mi nunc, sit amet fermentum nisi. Nulla vitae felis eros. Pellentesque viverra arcu ac metus lacinia a tincidunt quam sodales. Vestibulum ac velit at nulla tincidunt semper non et orci. Cras a erat eros. Vestibulum vitae felis nulla, at vehicula augue. Nulla eu tellus quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin massa augue, fringilla sit amet scelerisque quis, sagittis id erat. Praesent semper nulla quis neque blandit at sagittis felis luctus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vel nisl erat. Phasellus vitae libero erat. Aenean tortor ligula, porta sit amet mattis a, sagittis vel turpis.
</div>
Phasellus in aliquet quam. Nullam vitae aliquet metus. Praesent libero mi, gravida eu iaculis non, bibendum molestie neque. Integer hendrerit nulla quis arcu bibendum posuere. Pellentesque aliquet nisl quis magna rhoncus eget laoreet dui vehicula. Etiam dapibus dui id lectus gravida vestibulum porttitor dolor ornare. Maecenas vitae risus quis nisl cursus lobortis. Proin accumsan adipiscing varius.
</div>
</div>
And the CSS code:
.fixedHeightContainer {
height: 250px;
width:250px;
}
.fixedHeightContent {
height:250px;
overflow:auto;
}
#container {
width:300px;
height: 300px;
overflow: auto;
}
The situation is described in this example: http://jsfiddle.net/AWtnd/.
I have already tried these two solutions without success:
- using this JQuery plugin called "JQuery custom content scroller": http://manos.malihu.gr/jquery-custom-content-scroller/ but does not support nested scrollbar.
- using jscrollpane but i can't set "only vertical scrollbar".
What is the best solution to solve this problem? Thanks.