I have the following html:
<div class="title">
<span>Some title</span>
</div>
and i need the font-size of the span to be relative to the width of the div. I tried it with the vw:
.title span {
display: table-cell;
text-align: center;
vertical-align: middle;
font-size: 5vw;
}
but that isnt the solution because the container for the viewport does not seem to be the <div class="title"> because when i set it to 5vw for example it is much larger than my <div>.
So how can i set a font-size of a <span> relative to it's parent div.