jQRangeSlider
jQRangeSlider copied to clipboard
dateRangeSlider - differences in browser sub-pixel rendering throws off scales
Different browsers user different methods to convert percentage widths into pixels. Safari and IE round down to the pixel, Firefox and Chrome do a better job of rounding to the nearest pixel. For range sliders with extended date ranges the slider area will noticeably exceed beyond the last month in some browsers.
You can view this demo in Safari vs. Firefox to see the difference: http://jsfiddle.net/lukemcd/tbV8e/
This could be viewed as a browser bug but I think if jQRangeSlider did it's own conversion of percentages to pixels the plugin could guarantee more consistent results.
Thanks for your clear example.
I don't want the plugin to calculate pixels itself: it's very useful to rely on percentages when user resizes the window, hides/shows the slider etc.
But I think there is another solution, consisting in positioning every tick absolutely, with a left margin defined in %
I figured the percentages were best for resizing. Your solution seems like a sensible way to handle it.