2

Strugglig a bit with what seems to be a margin issue with jScrollPane. Tried setting margin: 0 pretty much on every element that's inside the jsp and on the actual jsp elements. I'm attaching a picture to show you the issue. The problem is the small black stripe between the content and the actual scrollbar.

jsp left margin issue

CSS for classes inside JSP

width: 100%;
min-height: 60px;
max-height: 300px;
margin: 0;
padding: 0;

CSS for JSP

.jspContainer
{
    overflow: hidden;
    position: relative;
}

.jspPane
{
    position: absolute;
}

.jspVerticalBar
{
    position: absolute;
    top: 0;
    right: 0px;
    width: 5px;
    height: 100%;
    background: url('../img/staffUl.png') repeat;
}

.jspHorizontalBar
{
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 16px;
    background: red;
}

.jspVerticalBar *,
.jspHorizontalBar *
{
    margin: 0;
    padding: 0;
}

.jspCap
{
    display: none;
}

.jspHorizontalBar .jspCap
{
    float: left;
}

.jspTrack
{
    background: transparent;
    position: relative;
}

.jspDrag
{
    background: #2a2a2a;
    position: relative;
    top: 0;
    left: 0;
    cursor: pointer;
}

.jspHorizontalBar .jspTrack,
.jspHorizontalBar .jspDrag
{
    float: left;
    height: 100%;
}

.jspArrow
{
    background: #50506d;
    text-indent: -20000px;
    display: block;
    cursor: pointer;
}

.jspArrow.jspDisabled
{
    cursor: default;
    background: #80808d;
}

.jspVerticalBar .jspArrow
{
    height: 16px;

1 Answer 1

11

KG Christensen,

Literally just had the same problem as you. Took some digging around until I figured out that this is actually a "feature" of jScrollPane. The solution is to the set the config parameter 'verticalGutter' to 0. It is 4px by default.

$(paneElement).jScrollPane({
    verticalGutter: 0
});

Should do the trick!

3
  • Holy cow, that did it! Had given up on this and used some very ugly CSS instead, but now it can finally look as intended. Thank you so much :)
    – Index
    Aug 3, 2011 at 21:17
  • @KG no problem! I've been getting used to jScrollPane--it works wonders if you figure out how to use it. Aug 3, 2011 at 23:53
  • 1
    Bravo :) ... its days like these that are saved by stackOverflow and its members ! +1 !
    – Aukhan
    Sep 20, 2012 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.