0

I am creating a banner slider using tiny-slider.

When loading the webpage on a lower screen resolution or zooming in and out of a moderate screen resolution, the decimal widths show the next slide.

I have tried setting a 100% width to the image and containers, but this will only fill up to the decimal max. It works when setting a whole number as the width (e.g. 1000px) but this is not optimal for responsive design.

Can anyone show me if it is possible to round up pixel widths to the nearest whole number?

Or if there is anything else you can suggest?

Jack
  • 1
  • 2
  • well, technically, if you create a slider with 3 items (not sure if use that, but thats what the example shows), it also calculates in decimals, 33.333% to be on the safe side (you ll always get a rounding, since in 3's you always have somewhere a 1 value you gotta split), hence the comma work. If you try it with 2 images, does it work then propperly. Also it can be the calulcation of your width on zoom, scaling, since you scale on the view, which is not pixel based. Is there not feedback of the tiny slider on that? https://ganlanyuan.github.io/tiny-slider/#responsive-options – Dorvalla Mar 07 '23 at 12:28

0 Answers0