Answer the question
In order to leave comments, you need to log in
How to remove padding from last element in Slick slider?
How to remove padding from last element in Slick slider? I can not throw the code, if someone knows, tell me, please.
HTML
.my-slider
.my-slider-one
img(src='img/gallery-photo-slaider.png')
p Татьяна Бикитеева
.my-slider-one
img(src='img/gallery-photo-slaider.png')
p Татьяна Бикитеева
.my-slider-one
img(src='img/gallery-photo-slaider.png')
p Татьяна Бикитеева
.my-slider-one
img(src='img/gallery-photo-slaider.png')
p Татьяна Бикитеева
.my-slider-one
img(src='img/gallery-photo-slaider.png')
p Татьяна Бикитеева
.my-slider-one
img(src='img/gallery-photo-slaider.png')
p Татьяна Бикитеева
css
.my-slider
width: 88%
margin: 0 5% 0 7%
.my-slider .prev
position: absolute
left: -23px
top: 33%
cursor: pointer
z-index: 1
.my-slider .next
position: absolute
top: 40%
transform: translateY(-50%)
cursor: pointer
z-index: 1
right: 0
JS
$(".my-slider").slick({
slidesToShow: 4,
slidesToScroll: 1,
prevArrow: '<img src="img/arrow-leftt-slider-photo.png" class="prev">',
nextArrow: '<img src="img/arrow-right-slider-photo.png" class="next">'
});
Answer the question
In order to leave comments, you need to log in
Add to the settings centerPadding: 0
, and then play with the margins of the slides themselves.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question