jScrollPane 2.0 height problem in chrome jScrollPane 2.0 height problem in chrome google-chrome google-chrome

jScrollPane 2.0 height problem in chrome


Did you also test in Safari? This sounds like an issue that occurs in Webkit when the javascript is included before the CSS in the head of the document:http://jscrollpane.kelvinluck.com/faqs.html#webkit-broken

If that isn't the cause then it might be something related to the fact that you have an image in your scrollpane. You need to either include the width and height of the image (see http://jscrollpane.kelvinluck.com/image2.html) or autoReinitialise the pane (see http://jscrollpane.kelvinluck.com/image.html).

Hope it helps :)


give the call to jscrollpane in $(window).load instead of $(document).ready


I have also discovered that adding a css rule to .scroll-pane for line-height solves my height issues.

For example:

.scroll-pane {line-height: 1;}

or whatever line height your content may need.

I also discovered that if you use @font-face, jscrollpane may do the height calculation before your font has properly loaded, and therefore miscalculate. I fixed this by adding the setting:

autoReinitialise: true

It runs on a timer though so use thoughtfully.