CSS text justify with letter spacing
Here’s a script which can do it. It isn’t pretty, but maybe you can hack it to meet your needs. (Updated to handle resizing) function SplitText(node) { var text = node.nodeValue.replace(/^\s*|\s(?=\s)|\s*$/g, “”); for (var i = 0; i < text.length; i++) { var letter = document.createElement(“span”); letter.style.display = “inline-block”; letter.style.position = “absolute”; letter.appendChild(document.createTextNode(text.charAt(i))); node.parentNode.insertBefore(letter, node); … Read more