Max font size when using VW in HTML Embedd

Hi Everyone,

I am trying to set a max font size to the font I have set to 7vw. At 1600px screen size and above, I want the font size to stop at 112px. How do I do this using an HTML Embed? I tried the below code, but I don’t think it is working. It doesn’t seem to apply to the class I created.

Thank you so much in advance!!

h1 class="home-header-text" { font-size: min(7vw, 112px); }

change the first line to

.home-header-text {
if you want it to apply all the h1s to
h1 {

you can also check out clamp

Fantastic!! Thank you so much for your help and for the resource you sent.

1 Like