B
B
Bartf2020-07-10 18:15:05
css
Bartf, 2020-07-10 18:15:05

How to crop a slide in slick slider?

Hello. I didn’t find the answer anywhere, so I’ll ask the experts) There is a section, somewhere 30% is occupied by the text (it is not in the slider) and 70% by the slider. It has 4 slides and the last one is cut in half? How to implement this? And then my classes break the slider.

spoiler
5f0885f0bd6bd551193757.png

P / S - the fact that the slides are of different heights, I did it crookedly. The layout is all the same.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Litvinenko, 2020-07-10
@Bartf

in the section we make two blocks. one for the text, the other for the slider. and the slider then these styles

.slick-slide {
  margin: 0 15px;
}
.slick-list {
  margin: 0 -15px;
  padding: 0 10% 0 0;
}

Specifically, the one with the padding. where margins are for indents between slides

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question