L
L
lololoshka20102022-02-23 01:35:46
css
lololoshka2010, 2022-02-23 01:35:46

How do I get flex applied to the second slider?

hello. the first slider in the post https://qna.habr.com/q/1119562 . actually, the elements line up like this: 621561dd3b507968708728.png
if I do this:

.slick-initialized .slick-slide {
    display: flex;
}
,
then in the code inspector it becomes normal, but on the first slider the text with the button is also placed in a row. Tell me, is it possible to somehow set other / additional classes for elements from the slick?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Ankhena, 2022-02-24
@lololoshka2010

Slick is deprecated.
It does not support flex for slides.
And this means that inside the slide you need to make a wrapper and set it to flex.
If you open the developer tools, you can see the display of the frames. (And many more useful things)
Alternative: stop wrapping pictures in 4 in one slide, and make each one a separate slide and say that you need to display 4 at a time.

A
Anonimmus, 2022-02-23
@Anonimmus

1. The slider is not initialized.
2. There is no default style for the slider, connect the js css library
3. In api slick, specify the number of elements in the slider and its location according to the documentation. Whether vertical or horizontal.
https://realadmin.ru/saytostroy/slick-slider.html
At the end, already style as you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question