jijo-paulose / jscrollpane

Automatically exported from code.google.com/p/jscrollpane
0 stars 0 forks source link

Content shifts to left by 16px (width of jscrollpane) #255

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create page with content not exceeding page length
2. create page with content exceeding page length while jscrollpane is used
3. content shifts to left slightly, 16px, the width of jscrollpane

What is the expected output? What do you see instead?
The expected output is not seeing content shift place

What version of the jScrollPane are you using? On what browser? And operating 
system?
latest

Please provide a URL to a page displaying the problem.
http://webdesign.c-tz.nl/index.php?id=werkwijze
Please provide any additional information below.

I know this must be an issue which has been addressed a hundred times and draws 
a slight sigh, but, I just can't figure it out...

This is like the FF and IE problem 10 years ago. We now have mighty css. You're 
not telling me some simple javascript can't calculate and adapt the screen 16px.

There must be some way to make a 16px width div or other element, invisible, 
when for example, jscrollpane comes in the viewscreen.

Or to make it float like a div, with z-index:1000 or something.. There must be 
some solution.

It's just so ugly seeing the shift and although some people don't mind, my 
customer does (I agree with him).

Please help solve this issue? (maybe an initialisation command "fix_left_shift: 
true;"?)

Original issue reported on code.google.com by ke...@c-tz.nl on 1 Nov 2011 at 3:16

GoogleCodeExporter commented 9 years ago
This isn't the correct place to get support for jScrollPane any more.

There is information on better places here:
http://jscrollpane.kelvinluck.com/#support

As a quick hint, there is a workaround for this problem somewhere that I've 
posted to jsfiddle.net which basically fakes things by forcing jScrollPane to 
always appear (by giving a contained element a min-height equal to the height 
of the current window) - you should be able to find it by searching the mailing 
list/ stack overflow...

Original comment by kelvin.l...@gmail.com on 1 Nov 2011 at 9:48

GoogleCodeExporter commented 9 years ago
I fixed it.

After a lot of trying I managed to reserve the space which is taken in by the 
jscrollpane.

I use two div's, one (the outer) called 'scrollpane_container', which is the 
div jscrollpane loads on, and another (the inner, inside 
'scrollpane_container') called 'scrollpane_content'.

scrollpane_container has a width of 1017,
scrollpane_content has a width of 1000, left-padding of 0px, right-padding of 
17px.

This reserves space right of ur content for the scrollpane to appear.

It's a bit more elegant then just making a scrollbar appear when you don't need 
it.

Original comment by ke...@c-tz.nl on 1 Nov 2011 at 12:17