Comments (6)
I tried doing the outerHeight(true) method. It did fix the scenario where the scroller is not needed. But now it bleeds the outer edge when it is. :-(
i've setup a html/css solution for this. http://bl.ocks.org/2007032
You should put the .nano
container inside a layer with a padding value. Or add a margin rule to the .nano
div content. This way, it allows the content layout to have a breathing space. (which I assume you were aiming for).
from nanoscrollerjs.
I forgot to say: my .pane
is transparent, so it doesn't matter for me if I add margin to .pane
, padding to .pane
, or margin to .slider
.
Your solution with putting padding on the element containing .nano
, or margin on .nano
, works for one of my use cases. Though, another of my use cases is using the scroller on a table of data. The table should have no margin at all, and be directly connected to the elements around it. The scroller should be positioned inside the table's border. For this case, adding padding on the element around .nano
or margin on .nano
doesn't help.
I've created to examples with a scroller inside a table:
- You can see the broken hiding of the scroller when not needed in the following example, which use margin on the
.pane
: http://bl.ocks.org/2020855 - In the other example, http://bl.ocks.org/2020898, I've used margin on
.slider
. Doing it this way, the hiding of the unneeded scroller works, but the slider length does not care about the slider's margin, so it is a bit too long, and bleeds into the space between the scroller and.content
's bottom.
from nanoscrollerjs.
Hi,
the easiest way is to change top and bottom properties of .pane, but you need to change a small portion of code to allow this:
from nanoscrollerjs.
What about creating a ratio between the pane height and the content height, and make ur calculations based on this?
use example is if i want to make a fixed height scrollbar, and the content area have different heights, something like the example on the right of this page:
http://manos.malihu.gr/tuts/jquery_custom_scrollbar.html
from nanoscrollerjs.
With the release of 0.5.7, this issue is resolved for me:
I can set .pane { top: 5px; bottom: 5px; }
, and the pane is still hidden when it is not needed.
from nanoscrollerjs.
margin
can now also be added since 712b871 so this is all fixed
from nanoscrollerjs.
Related Issues (20)
- Several classes for sliders (and panes, maybe)
- alwaysVisible doesn't make scrollbar always visible
- Nanoscroller doesn't scroll browser window when user is pulling down scrollbar slider with the mouse HOT 1
- dynamic content HOT 3
- In firefox for linux, default scroll bar is shown beneath nanoscroller .pane HOT 4
- scrollbar not visible
- No source files on NPM? HOT 4
- How to implement lazy-load images HOT 2
- Multiple Nanoscrollers. HOT 1
- Prevents click events on Windows 8 HOT 1
- Save scroll position HOT 4
- Top attribute on parent container shortens scroller HOT 1
- it has some delay in low internet speed mode! HOT 2
- Child Scrolling issues. HOT 2
- Unable add nano scroll on body element? HOT 1
- [QUESTION] Where I can find the CI service?
- Apple ipad 4 in Chrome default scrollbar is visible. what could be the reason? And how to fix? HOT 1
- is there any support for react?
- Slider not draggable - Right click and drag works but left click not working (fullpage.js)
- broken url
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanoscrollerjs.