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

145
Views
How do you change css when window size gets to a certain point in javascript

I want the font to adjust when the sc reen size gets to 1050px. How do i do this with javascript

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

0

Add this to your css:

@media screen and (min-width: 1050px) {
    body {
        /* set font adjusters here */
    }
}
about 4 years ago · Juan Pablo Isaza Report

0

you can do it with css and javascript

CSS

@media screen and (min-width: 1050px) {
    body {
       font-size: // the value you want
    }
}

JavaScript

if(screen.width < your point) {
  // change font size
}
about 4 years ago · Juan Pablo Isaza Report

0

you need to add event listener

const handleResize = () => {
  if(window.innerHeight > 1050) {
     //you can change font size here
     document.getElementById("yourelement").style.fontSize = "69px";
  }
}
window.addEventListener('resize', handleResize)

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!