I am trying to set a specific set of character or pixel width limit in a html line.
I have javascript that pulls in a word from a array to populate the second word in a line depending on the region of the country the page is loaded from - but if the sting is longer, the line wraps and sometime it does not.
The code is like
<p> Hello <span class="set-width"> $WORD-FROM-JS </span>, how are you ? </p>
example
<p> Hello <span class="set-width"> Germany</span>, how are you ? </p>
how to configure "set-width" to be 100px or 10 characters so the length of the text is same - like;
Hello Germany, How are you ?
Hello USA , How are you ?
Hello India , How are you ?
Hello Korea , How are you ?
Hello Afghans, How are you ?
thanks