Is there a way to adjust the font size in HTML so that when I resize the window, the text size adjusts accordingly? It's like setting a percentage for the text based on the size of the container it is in.
Let me provide an example of what I have in mind:
#box #text {
font-size: 50%;
}
For instance, if #box
has a width of 200px, then #text
should be 100px. The challenge arises because the width of #box
will vary dynamically on the website, making it impossible to set a fixed width for #text
.