Good day to all, the essence of the problem: There is on the slick slider page. There is a need to place it in absolute positioning, but if you set it to position: absolute, then its elements become incredible widths. How can this be overcome? I already thrust it in a bunch of wrappers and that just did not try. Made absolute wrappers and all in vain ... Here is a link to the slider
HTML:
<div class="wrapper"> <div class="wrap"> <div class="slider"> <div class="list" ></div> <!-- /.slider-item --> <div class="list sec" ></div> <!-- /.slider-item --> <div class="list" ></div> <!-- /.slider-item --> <div class="list sec" ></div> <!-- /.slider-item --> <div class="list" ></div> <!-- /.slider-item --> </div> </div> <!-- /.wrap --> </div> <!-- /.wrapper --> CSS:
.wrapper{ position: absolute; } .slider { width: auto; margin: 30px 50px 50px; position: relative; } .list{ padding-left: 10px; padding-right: 10px; width: 50px; height: 50px; background-color: #aeaeae; } .sec{ background-color: red; } .slick-prev:before, .slick-next:before { color: black; } .slick-dots { bottom: -30px; } Js:
$(".slider").slick({ infinite: true, slidesToShow: 3, slidesToScroll: 1, dots: true, });