I have a string that I want to display on a web page that is dynamically passed in. I want to be able to dynamically determine the css width needed to display this string and then wrap it in an html element with the exact size needed to display it.
I am currently using javascript and dojo, so answers using those two are fine, but anything else won't work.
More Detail I guess I should clarify. I want to display the string in an input field, so not as simple as a div (I think at least)
<div>or<span>) around the string... wouldn't you then be able to find the pixel width of that particular string by checking the<div>or<span>that surrounds the string?