Is it possible to dynamically stretch a text width to its parent’s witdh? In other words, I am looking to get the following result but dynamically. Solutions that require Javascript are ok.
div{
width:260px;
border:1px solid tomato;
background:white;
font-size:20px;
font-family:arial;
}
.p1{
transform:scale(2.3,1);
-webkit-transform:scale(2.3,1);
-moz-transform:scale(2.3,1);
-ms-transform:scale(2.3,1);
-o-transform:scale(1,1.09);
transform-origin: 0 0;
}
.p2{
transform:scale(5.1,1);
-webkit-transform:scale(5.1,1);
-moz-transform:scale(5.1,1);
-ms-transform:scale(5.1,1);
-o-transform:scale(5.1,1);
transform-origin: 0 0;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>TEEEEXT</title>
</head>
<body>
<div>
<p class="p1">This is a test</p>
<p class="p2">A test</p>
</div>
</body>
</html>