bug with #side-scroll

bug with #side-scroll

There seems to be an error with this snipit:  https://jqueryui.com/slider/#side-scroll

If you put N items in, it doesn't seem to automatically scale to the size required.  How can I work around it so it adjusts as needed?