SashayAway SashayAway - 1 year ago 64
HTML Question

Automatic font resize, how is it possible?


I would like to know what this website is using to make the font-size bigger or smaller automatically depending how big is your browser windows.

I think it is not just @media font-size: 14px... because if you check it with the Google Inspector, the font-size changes a very specific size like: 20.3579px. I think the website is calculating a font size between two numbers, for example: 14 to 25.

How is it possible?

Answer Source

Use vw(viewport width) it resizes the font according to window size.

h1 {
  font-size: 5.9vw;
h2 {
  font-size: 3.0vh;
p {
  font-size: 2vmin;

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download