K
K
kutovoy_102019-05-23 09:53:16
css
kutovoy_10, 2019-05-23 09:53:16

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.5ce643536e646480893271.png

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

1 answer(s)
A
Anton Usachov, 2019-05-23
@rockfeeler

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 question

Ask a Question

731 491 924 answers to any question