ganlanyuan / tiny-slider

Vanilla javascript slider for all purposes.
MIT License
5.21k stars 779 forks source link

autoHeight not applying same heigth on each item #515

Open MKlblangenois opened 4 years ago

MKlblangenois commented 4 years ago

Issue description:
When I apply autoHeight on my slider, the height isn't the same on each item

Demo link/slider setting:

Tiny-slider version: 2.9.2 Browser name && version: Firefox 71.0 / Chrome 78.0.3904.108 OS name && version: MacOS 10.15.1

thimmayya commented 3 years ago

@MKlblangenois, The height issn't suppose to be the same on each item with autoHeight:true.

autoHeight: Height of slider container changes according to each slide's height.

So that means that your container will adapt to the height of the tallest visible item. However your items per say won't be equal height.

I can't seem to find an equal height option though, and it would be a nice feature to have.

ilvoo commented 2 years ago

@MKlblangenois, The height issn't suppose to be the same on each item with autoHeight:true.

autoHeight: Height of slider container changes according to each slide's height.

So that means that your container will adapt to the height of the tallest visible item. However your items per say won't be equal height.

I can't seem to find an equal height option though, and it would be a nice feature to have.

Have you already found a solution?

drbiskit commented 2 years ago

Old thread, but for ref, you can set the height on each item to be the same with CSS: .tns-slider { display: flex; } .tns-item { flex: 1; }