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

208
Views
Replace a CSS sheet

I am using an script which uses a remote file.css. I want to add a local file.css in order to override some remote.css styles.

Any suggestion of how could I do it?

Thank you!

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

If you just want to use the new styles instead, you can find the link element and just replace the href with the path to the other file. Like this:

document.querySelector("link[href=style.css]").href = "path/to/new/file.css";

If you want to override some styles, you'll need to make sure the new file is loaded after the first and then either use more specific selecors or !important. You can't really "edit" the file in the browser before loading it though, which is what it sounds like you might be asking about.

about 4 years ago · Juan Pablo Isaza Report

0

If you want to edit the css and not to replace all the css, you can use inline style or you can use bootstrap. For example:

…
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!