01-17-2003, 12:50 AM
Can something like "maxlength" be applied to a text field, in such a way that it limits text input to the width, in pixels, of the text box, rather than the number of characters that can be entered?
01-17-2003, 02:12 AM
You need some scripting for that:
01-17-2003, 03:23 AM
you also can just do:
<input type="text" style="width: 400px;" name="mytext" />
01-17-2003, 03:24 AM
That script seems to mimic maxlength, by limiting character input, but doesn't really define pixel width...
thanks for the link, though.
01-17-2003, 03:26 AM
Then combine the script with the CSS I posted above. Or is that not what you are going for?
01-17-2003, 03:31 AM
you also can just do: <input type="text" style="width: 400px;" name="mytext" />
The text field has style applied to it, but that doesn't seem to keep the text confined to that width.