Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

308
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda