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

175
Vistas
Add Margin to buttons while translating in angular

I have this custom slider

https://stackblitz.com/edit/angular-ivy-airvm5?file=src/app/app.component.css

On Next and Previous buttons clicks images are getting changes from images array but main issue is when we click on next button while translating the next and previous button position are changed to top, but here i want when i translate as different slides will have different height of images so next and previous button should automatically positioned according to the height of images. I was trying to give margin top also

 let currentMargin = parseInt(this.nextdiv.nativeElement.style.marginTop);
 if(isNaN(currentMargin)){
    currentMargin = 0;
  }
   
 let newMargin = currentMargin + 70;  
 this.next.nativeElement.style.marginTop = newMargin+'px';

screenshot:

enter image description here Any solution Thanks

about 4 years ago · Juan Pablo Isaza
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