ngx-slider
ngx-slider copied to clipboard
Hide bar outside first and last tick
Hi there,
I am trying to customize the slider so that it has no longer the edges of the bar outside of the first and last tick.
From what I have seen, all ticks have a margin top or left depending if vertical or not. Removing the margins doesn't really help since, the bar edge outside the last tick would obviously increase.
Is there any styling that can be applied or options to be passed that would create this behavior? Thanks in advance.
I'm also struggling on this one
@dana-c0914 @itaispector what you can do is to just apply some simple styling to the ngx-slider-bar:
.ngx-slider-bar { left: 4px; right: 4px; width: auto; }
Instead of letting the element have 100% width just put it to auto and set right and left values to the number of pixels you want to 'trim' from each side. I hope that helps a bit. You can play around in the browser directly to match your styling.
Closing as the solution is documented in comment above.