D
D
Dymok2018-07-09 13:17:28
css
Dymok, 2018-07-09 13:17:28

How to set a margin between slick slides, but remove them from the first and last ones shown?

I'm trying to make a slider with three slides using slick slider. According to the layout, you need to make sure that there are indents between slides, but there is no left indent for the first one shown and no right indent for the last one. That is, you need it like this:

screen
go_ao7iobrtkcmxnxxynrb9cgaa.jpeg

If you just set a margin for each item, then it turns out like this:
screen
cupqcayfv8kmfhokz2n1gp9hu3a.jpeg

That is, you need to remove these indents so that the slides increase in width to the vacated space:
screen
uhvkggkjebvimryclj4pwx05tmu.jpeg

How can this be done?
Thanks in advance.
codepen
PS I tried to set .slick-active margin-right to 60px and remove the margin from the first and last, but then everything generally breaks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Zabrodin, 2018-07-09
@UnluckySerivelha

So?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question