Trying to copy a style

I’m trying to copy the texts style in

to my site

The white text seems to be scale-able (see what happens if I change the window size of both sites

How is their text doing that?

Doing what?

1 Like

its size seems to depend on the viewport, mine doesnt.
Should I use vw instead of em

I see now (missed your comment inbetween the pictures).
They are doing via some script to alter the text size in some in-line styling on the h1 element, which is a bit dumb these days because it can now be done with pure css using vw units.

h1 {
    font-size: 2em ; /*fallback for old browsers */
    font-size: calc(1em + 5vw) ; /* Tweak to fit */

You could just use #vw instead of calc, but it can get a bit extreme.

1 Like

I’ve added a bit of space - hopefully that helps.


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.