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

174
Views
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
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!