Let\'s say I have the string \"Hello\". This string is obviously five characters in length, but what is its length in pixels? Is there an easy way to determine this length i
You can determine the number of pixels the container of the string. You can do this by creating a hidden element in the DOM, setting the inner HTML to the string and then asking for the width.
I don't think their is a good, easy way to do that, except computing the length of a container. The width depends on the font-size, the font, the letter-spacing, it will be different depending on the browser etc...