Slick: How to set different widths on the center mode to my slides?

Created on 29 Aug 2014  路  4Comments  路  Source: kenwheeler/slick

I have a ul with a lot of li's, each one of my li's have a text, and anyone of the text's have the same size...
I want to use the center mode, so when my li is in the center of the carousel, the font-size increases, and then, at present, it gets serious...

The li still have the same width that had on the start, and overlap the others around them...

Most helpful comment

If I set the width using .slick-center it doesn't calculate the offsetLeft correctly and it "jumps" back to the correct position after the animation

All 4 comments

the .slick-center class

If I set the width using .slick-center it doesn't calculate the offsetLeft correctly and it "jumps" back to the correct position after the animation

.slick-current{
transform: scale(1.5);
}
P.S: you can change the ratio based on your design, and you have to re-allocate arrows - in case you made them activated.

Scale doesn't always work, some designs show expanded content in centered slide.

Was this page helpful?
0 / 5 - 0 ratings