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

167
Views
Scaling the entirely content of a container based on the viewport width

I'm trying to get the following up with a text inside a container: Desired behavior animation

But unfortunately, that's what I'm getting: My approach

Here's the code I have so far:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        .container {
            max-width: 1920px;
            margin: 0 auto;
        }

        .title {
            font-size: clamp(12px, 10vw, 142px);
            text-transform: uppercase;
            align-items: center;
            white-space: nowrap;
            width: 100%;
        }
        .title:last-child{
            text-align: right;
        }
    </style>
</head>

<body>
    <section>
        <div class="container">
            <h2 class="title">Get in touch</h2>
            <h2 class="title">Know about me</h2>
        </div>
    </section>
</body>
</html>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You should set height of your container using vw as well as width of your element consider

height : 20vw;

It will work as you want, let me know if otherwise

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!