coder_bro
coder_bro

Reputation: 10773

IE textarea width changes when user types some text

I have a page in which there are a few textarea and <input type="text"> html controls. These elements are placed in a div tag:

alt text

In IE 7 after the user types some text in textarea, the width of the textarea changes on its own: alt text

and now again if the user types some text in the textbox, the textarea agian returns to its original width: alt text

Has anyone faced any similar issues?

Upvotes: 2

Views: 844

Answers (2)

user3065250
user3065250

Reputation: 11

I'm currently facing the same problem on IE8 and IE9. In my case, the text area, expands to full width of window when I type in it. When the focus shifts to any other component, it comes back to original width. Upon enough reading and trying a couple of things, my observation is, if we wrap text area with a fieldset tag, width comes to control. But, currently upon trying it, width seems to come to proper width BUT as initially the DOM loads, the textarea seems to have reduced width, then it expands to proper width. Minor though but it still is a bug in my application and I'm unable to understand this behavior. Any help is appreciated.

This is what currently (partially) works for me:

<fieldset>

<textarea> </textarea>

</fieldset>

Upvotes: 1

Dmitri Farkov
Dmitri Farkov

Reputation: 9691

Set a width in px, for the textfields. Should resolve the expanding behaviour.

Upvotes: 2

Related Questions