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

202
Views
How to make font smaller when string too long?
<div className="container">
      {text}
</div>

Hi, I'm new in CSS. The text is sent by network request, and it may return a long or short string.

How to make text font resizable when the container has fixed height and width?

When I get a long string, I want font-size a bit smaller but always full with container.

When I get a short string, I want font-size a bit bigger but not overflow.

By the way, I'm using React.

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!