Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

300
Views
Slick Carousel - how to change active slide position

Hi I need to move the current active slide to the right a bit with padding-left. Doing so makes the slider jump a bit on each next slide.

How to fix this behavior?

https://jsfiddle.net/ezy50jd2/2/

HTML:

<div class="slick-center">
  <div>
    <img src="https://via.placeholder.com/260x150">
  </div>
  <div>
    <img src="https://via.placeholder.com/260x150">
  </div>
  <div>
    <img src="https://via.placeholder.com/260x150">
  </div>
</div>

CSS:

.slick-slide{
  width: 300px;
}
.slick-center .slick-current{
  padding-left: 90px;/*this makes slides jump*/
}

Setup:

$(function () {
    $('.slick-center').slick({
        infinite: true,
        autoplay: true,
        centerMode: true,
        centerPadding: '180px',
        slidesToShow: 1,
        slidesToScroll: 1,
        speed: 400,
        dots: false,
        prevArrow: false,
        nextArrow: false,
        variableWidth: true
    });
});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You could try using the transform attribute. You might even add transition effect for smoother animation.

 transform: translateX(90px);  
 transition: 1s ease-in-out;

A fork of your fiddle with the implementation https://jsfiddle.net/nh4qucdp/25/

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!