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

139
Views
Why doesn't my element move along the X axis?

I have tried a lot of ways but they don't seem to apply to my scenario. I want the anchor element to move 20px along the x axis. HTML:

<!-- When this is clicked moveElement() is initiated to translateX by 20px -->
<a href="#" id="aButton" class="getStarted" onclick="moveElement()">Get started</a>

Javascript:

function moveElement() {
      let btn = document.getElementById("aButton");
      btn.style.translateX = "20px";
      // I also tried transform = 'translateX("20px")' but it did not work.
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

translateX is not a valid CSS property. Perhaps you mean:

btn.style.transform = "translateX(20px);";
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!