NickPiscitelli/Glider.js

Can an item be set to a specific height and width?

Pieter0313 opened this issue · 1 comments

I want my items to be exactly 100px by 100px in size. This is what I'm trying to accomplish:
image

If I set my itemWidth to 100, it doesn't actually set the item width to 100px, but to 150px. Am I doing this wrong or is this a bug?

This is what it looks like in the browser:
image

       new Glider(document.querySelector('.glider'), {
            itemWidth: 100,
            slidesToScroll: 2,
            slidesToShow: 'auto',
            dragVelocity: 2,
            draggable: true,
            dots: '.dots',
            arrows: {
                prev: '.glider-prev',
                next: '.glider-next'
            }
        });

Have you tried "exactWidth" property?
Height is "auto" by default and it seems we can control it just by using !important rule in CSS.