I have a <div>
that I can resize and I have font-sie that becomes smaller only if I resize the window. How can I make the font-size smaller on <div>
resize? I want to have it on the same line.
Here I have my code:
$('.resize').resizable({minWidth: 110,
minHeight: 120});
.resize{
font-size: 2.8vh;
white-space: nowrap;
color: black;
background:yellow;
cursor:move;
width:130px;
height:130px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/themes/smoothness/jquery-ui.css">
<div class="resize">Some name that is very long</div>
P.S. use the full page to see the problem