Hi all, I'm new here at daniweb.com and I have this question that want to share with you.
Lately I've been trying to set the width of an input so it shows an expecific number of chars according to it's font size. I mean: <input id="myInput" type="text" value="12345678901234567890" />
as you can see, this is an input with 20 characters in it. What I want to do is to set it's width to match exactly 20 chars. I was wondering if there is some way of doing this width css, maybe something like this:
<style type="text/css">
#myInput{
width:20ex; /*it's my understanding that the ex unit should be the x-height for a font*/
}
</style>
Thanks.
PS:sorry for my english.