How to make font-size relative to the div element.

Hello, i started learning HTML/CSS recently and i can't understand how to make the text responsive. I want to make it like an image for example with width and height in %. But it doesn't work with font, i tryed with VH but when i resize the browser i have overflow issues. I saw videos about EM and REM but i don't see how this would help me. They are still fixed sizes like pixels. There is no way to make it relative to the size of a div?
If you watch the screens i uploaded i used vh to the text and vh to the divs. When i resize the browser the text resizes to the screen size not the div element that is resizing too, and is creating me problems.
1.PNG
2.PNG
Was this page helpful?