Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Blog preview card

Konrad 370

@konradbaczyk

Desktop design screenshot for the Blog preview card coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What specific areas of your project would you like help with?

Change font size without using media queries.

Community feedback

Boris 2,870

@mkboris

Posted

To change font sizes without using media queries you can use the clamp() function, it allows you to set a minimum, preferred, and maximum size, making the font size responsive to the viewport.

Example :

body {
  font-size: clamp(1rem, 2vw + 1rem, 2rem); /* Minimum 1rem, ideal size based on viewport, maximum 2rem */
}

Marked as helpful

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord