YIZHUANG / react-multi-carousel

A lightweight production-ready Carousel that rocks supports multiple items and server-side rendering with no dependency. Bundle size 2kb.
MIT License
1.25k stars 286 forks source link

Extra element space after last element in the grid #270

Open asharma1989 opened 3 years ago

asharma1989 commented 3 years ago

Describe the bug The issue I have is that I do have overlap on my element when sizing the window. I am interested to make sure that the space between 2 elements remain constant. To get this fixed i used a hack given in one of the bug solutions: .react-multi-carousel-item{ max-width: 230px; min-width:230px; } But now an extra element space is added after last element in the grid. What should be the ideal way to have the multiple elements with fixed size for responsive layout.

To Reproduce The step to reproduce is to enable the carousel and inside each div you can replace the item text by a image. the image size are fixed so when size of the window change, the space between the elements is changed. I assume because of the use of em or rem. Add the css mentioned above in your css file.

Expected behavior it should be good to be able to define the space between items and keep it fixed and there should't be any extra space at the end of the elements grid.