N
N
Novamoscow2017-03-11 11:52:30
css
Novamoscow, 2017-03-11 11:52:30

How to set padding between slides in SLICK?

The slider itself considers the width of the slides (can I somehow set the width myself?), It adjusted more or less by setting the width of the container where the slider itself lies.
BUT there was a problem, I set 10 slides in 2 lines (5 in each). But I can't set the indents between the slides.

Link to slider off page kenwheeler.github.io/slick Slider

code

$(document).ready(function () {
        $('.slaider-spares').slick({
            slidesToShow: 5,
            slidesToScroll: 1,
            rows: 2,
        });
    });

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
iBird Rose, 2017-03-11
@Novamoscow

you set styles for .slick-slide {padding: 0 15px;} for example. and for container margin: 0 -15px;

V
Vladimir Kulikov, 2021-04-28
@it_proger29

In 2021, it is enough for the parent of the slides to set such styles

column-gap: 78px
flex-wrap: wrap
row-gap: 0px

K
kos88, 2021-07-28
@kos88

.slider_wrap * {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.slick-slide { margin: 0 10px;}
.slider-item img { max-width: 100%;}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question