Tuesday, December 13, 2005

Set style 100% width in text field

In HTML,
<input name="subject" value="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" style="width: 100%;" type="text">, IE really mess up the layout due to the very long value.

I switch to <textarea name="subject" style="overflow: hidden; width: 100%; height: 1.5em;"></textarea> and believe this is better UI. But, I need to strip out line break and, maybe, implement row auto expanding -- just like yahoo e-mail composer's TO field.

This solution is good for me, since I don't have size limition for subject field.

No comments: