One very basic question about <input type='text'>
in HTML.
I currently have a database, and I am using javascript/ajax to set the value from the database into the textbox.
In a normal situation, any text inside the textbox will fit in nicely, like in this picture.
In a non-normal situation, I can have a very long string set inside the textbox, like in this picture
I am wonder if there any sort of javascript/css functionality that I am not aware of. Such that I can 'dynamically' increase the width of the <input type='text'>
or the padding inside the <input type='text'>
such that that textbox can hold a long string relatively nicely?
I am not sure if my question is absurd in such a sense that we never know the length of the string that I am going to fetch from the database. So it seems unlikely that I can know by how much I can increase the width of the textbox.
Thank you in advance.