I'm looking for a solution to span the text to the edge of the div. I don't want to have any white-space in the div.
Here is my div
<div class="m-card__text-front">
<p class="fit-text">TEST TEXT</p>
<p class="is-bold fit-text">FOO BAR</p>
<p class="is-bold fit-text">LOREM</p>
<p class="fit-text">LOREM IPSUM</p>
</div>
Now this looks looks at the moment like this
The red marked spots that is where I want the text to go span to.
I also need the bold text to be a different size (bigger) then the other text.
I am currently using the fitText function. https://github.com/davatron5000/FitText.js
Used like this:
<script> $('.fit-text').fitText(0.8); </script>
EDIT:
Here is how the HTML looks like with the plugin:
<p class="fit-text" style="font-size: 38.6055px;">TEST TEXT</p>
Font size is being added automatically.
EDIT 2:
Well i just realized that i explained my problem wrong. How I explained it your function does exactly what I described. But i want to span the text and make the letter accordingly bigger. That is why I tried to use that pluggin. Sorry Englisch is not my first language.. My bad.