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

106
Views
Change width of range slider thumb based on JavaScript variable

I would like the thumb part of a range input to be equal to 1/max, ie: if the max number for the range input is 5 then I want the thumb to be 1/5th of the width. I am using TailwindCSS but I used plain CSS to modify the thumb to look how I want it to look but I can't figure out how to dynamically change the width based on a variable. There are multiple range inputs so I cannot use CSS variables and the max for each is always different so I can't hard code them in either. If someone knows how to do this by using either Tailwind or plain CSS I would greatly appreciate it.

Thanks in advance.

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!