0

I want to make two string with different symbols count the same length. The first letter of str 2 must be starting under first letter of str 1. The same for the last letters.

<h1 id="master_length">some string of random length bla bla</h1>
<h1 id="slave_length">some string of random length</h1> 

I want:

<h1 id="master_length">some string of random length bla bla</h1> 
<h1 id="slave_length">s o m e string of random l e n g t h</h1> <!--need more letter-space-->

How can I get it dynamically for any string length? Maybe no need to use letter-spacing for this!

salius
  • 113
  • 7
  • Might this help you? https://stackoverflow.com/questions/16015957/jquery-fit-text-into-element-with-only-letterspacing-word-spacing – Paul Jun 14 '20 at 11:27
  • Or this? https://stackoverflow.com/questions/5976289/stretch-text-to-fit-width-of-div – Paul Jun 14 '20 at 11:29
  • the answer I gave you here still apply: https://stackoverflow.com/a/62365361/8620333 .. no need letter spacing, justify-text will do the job here – Temani Afif Jun 14 '20 at 12:01
  • @TemaniAfif the problem of the answer is that there stretch only spaces, but I want to stretch a whole line – salius Jun 14 '20 at 12:15

0 Answers0