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

188
Views
JS d3 obtained element width is less than the hardcoded value

CSS:

#full_bar {
  width: 240px;
}

JS:

console.log(d3.select('#full_bar').style('width'));

Output is '208px'. If I change the hardcoded value of '240' to a different one, the output is always a fixed percentage of the hardcoded value. I assume the CSS style is being overwritten, but I don't know where. If I inspect it in the browser it says the width is 240px, and the visual bar doesn't appear to be cropped at all. Any advice?

Edit" Just realised this only happens in Safari, and not Chrome. How can I prevent this from happening in Safari?

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!