I'm trying to set my Slick slideshow to display in center mode with the following code:
// slider
$('.slider-inner').slick({
centerMode: true,
centerPadding: '260px',
dots: 0,
slidesToShow: 1,
responsive: [
{
breakpoint: 768,
settings: {
arrows: false,
centerMode: true,
centerPadding: '40px',
slidesToShow: 1
}
},
{
breakpoint: 480,
settings: {
arrows: false,
centerMode: true,
centerPadding: '40px',
slidesToShow: 1
}
}
]
});
Desktop layout
Below you can see how it looks on my desktop layout, pretty much exactly how I'd like it (with one photo displayed and the other two cut off):
Tablet layout
But when I view it at 768px wide, I get 3 images displayed just like a standard carousel, despite me setting the responsive
options in the code. I find that, no matter what values I set in the responsive
options, it has no effect on the tablet layout.
But if I change the default options (e.g. for the desktop layout) then this does have an effect on the mobile layout: