S
S
Serqwezxc2021-07-06 21:06:28
css
Serqwezxc, 2021-07-06 21:06:28

Slick-slider not working at max-width?

How to set up a slick-slider so that with a fixed block width, it would normally adapt through breakpoints, that is, it would be centered, not broken. If you don't set a maximum width, it simply stretches the boxes to the full width of the parent. I hope I was able to explain. Here is the code https://codepen.io/SergeyMsky/pen/gOWrbox

.cards__container{
    display: flex;

    margin: 0 -15px;

    justify-content: center;
    flex-direction: column;
}
.slick-track{
    display: flex;
}
.slick-list{
    overflow: hidden;
}
.slick-dots{
    display: flex;

    align-items: center;
    justify-content: center;
}
.cards__box{
    position: relative;

    overflow: hidden;
    max-width: 240px;
    margin: 15px;

    transition: .2s all linear;

    border-radius: 6px;
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question