11

Is there that this can be achieved ie so that the slides don't adjust in width depending on viewport size: My example is here:

http://machinas.com/wip/hugoboss/responsive-template/v4/

And the code is as follows:

$('.main-slider').slick({
         centerMode: true,
        centerPadding: '0px',
        slidesToShow: 3,
        dots: true,
         speed: 1200,
         slidesToScroll: 1,
          infinite: true,
          customPaging: function(slick,index) {
                return $('.thumbnails').eq(index).find('img').prop('outerHTML');
            },
          responsive: [
            {
              breakpoint: 640,
              settings: {
                arrows: false,
                dots: true,
                centerMode: false,
                slidesToShow: 1,
                customPaging: function(slick,index) {
                    return '<button type="button" data-role="none">' + (index + 1) + '</button>';
                  }
              }
            }
          ]
});
user1937021
  • 10,151
  • 22
  • 81
  • 143
  • related http://stackoverflow.com/questions/23273506/how-can-i-change-the-width-and-height-of-slides-on-slick-carousel – Adriano Feb 09 '16 at 10:39

3 Answers3

33

You can use the variable width setting. This tells slick to let your css do the work:

variableWidth: true
Andy
  • 49,085
  • 60
  • 166
  • 233
Jeff Lindblom
  • 421
  • 4
  • 3
3

Check your slick.js version - variableWidth was added to version 1.3.8 on Sept 30, 2014.

ksudac
  • 71
  • 4
3

If you set variableWidth to true, make sure you do not use the slidesToShow setting, or the slider will not advance.

Taiger
  • 129
  • 1
  • 3