I have a textbox whose width in pixel should be determined by the number of charaters in it. The font size for character is fixed.
My logic for this is to setg textbox's css-width to required width.
requiredWidth = "number of characters" * "fontsize in pixel"
This simple formula Doesn't work. Any idea how to convert number of characters into pixels ?
Also is it possible to retrieve a dom element's size in pixel if the css.width is not set?