Content here CSS max-width: 300px; max-height:300px Demo on jsfiddle. The textarea element represents a field for multi-line text input. For default the text area is re sizable. In your case you want to fix the . Add this piece of code to your textarea style: Html Attributes of Html.TextArea TextArea is a multiline text input control that can accept a large number of string lines. Specifies the width of the textarea based on the number of visible character widths. We will use the following Student model class … We can make any element editable and input-like with the contenteditable attribute: 99 . maxlength: number: Specifies the maximum number of characters in textarea. placeholder : text: Specifies a short hint of the value in textarea. textarea controls are useful to collect or edit long runs of text like messages, files' contents, lists, reviews, articles, etc.. The HtmlHelper class includes two extension methods to render multi-line /form > … form: form_id: Specifies one or more forms. textarea {. textarea { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: 100%; } View Demo Setting the box-sizing to border-box allows the textarea to respect its parent container's padding and border, recalculating what 100% actually means. readonly: readonly The content of this element represents the initial value of the control. div { border:1px solid red; padding:5px; } textarea { width:100%; border:1px solid blue } Admittedly the gap on the right is smaller so it doesn’t look perfect. width: 100px; Using width: 100% I added the following line to your javascript function, setting the width of div to the width of the textArea element prior to resizing the height of the textArea: divHidden.style.width = element.getBoundingClientRect().width + ‘px’; Some developers also use cols and rows css property to provide textarea size. That allows users to edit multiple lines of plain text of visible character widths the... Property to provide textarea size from being html CSS max-width: 300px; max-height:300px Demo on jsfiddle. The textarea element represents a field for multi-line text input. For default the text area is re sizable. In your case you want to fix the . Add this piece of code to your textarea style: Html Attributes of Html.TextArea TextArea is a multiline text input control that can accept a large number of string lines. Specifies the width of the textarea based on the number of visible character widths. We will use the following Student model class … We can make any element editable and input-like with the contenteditable attribute: 99 . maxlength: number: Specifies the maximum number of characters in textarea. placeholder : text: Specifies a short hint of the value in textarea. textarea controls are useful to collect or edit long runs of text like messages, files' contents, lists, reviews, articles, etc.. The HtmlHelper class includes two extension methods to render multi-line /form > … form: form_id: Specifies one or more forms. textarea {. textarea { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: 100%; } View Demo Setting the box-sizing to border-box allows the textarea to respect its parent container's padding and border, recalculating what 100% actually means. readonly: readonly The content of this element represents the initial value of the control. div { border:1px solid red; padding:5px; } textarea { width:100%; border:1px solid blue } Admittedly the gap on the right is smaller so it doesn’t look perfect. width: 100px; Using width: 100% I added the following line to your javascript function, setting the width of div to the width of the textArea element prior to resizing the height of the textArea: divHidden.style.width = element.getBoundingClientRect().width + ‘px’; Some developers also use cols and rows css property to provide textarea size. That allows users to edit multiple lines of plain text of visible character widths the... Property to provide textarea size from being html CSS max-width: 300px; max-height:300px Demo on jsfiddle. The textarea element represents a field for multi-line text input. For default the text area is re sizable. In your case you want to fix the . Add this piece of code to your textarea style: Html Attributes of Html.TextArea TextArea is a multiline text input control that can accept a large number of string lines. Specifies the width of the textarea based on the number of visible character widths. We will use the following Student model class … We can make any element editable and input-like with the contenteditable attribute: 99 . maxlength: number: Specifies the maximum number of characters in textarea. placeholder : text: Specifies a short hint of the value in textarea. textarea controls are useful to collect or edit long runs of text like messages, files' contents, lists, reviews, articles, etc.. The HtmlHelper class includes two extension methods to render multi-line /form > … form: form_id: Specifies one or more forms. textarea {. textarea { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: 100%; } View Demo Setting the box-sizing to border-box allows the textarea to respect its parent container's padding and border, recalculating what 100% actually means. readonly: readonly The content of this element represents the initial value of the control. div { border:1px solid red; padding:5px; } textarea { width:100%; border:1px solid blue } Admittedly the gap on the right is smaller so it doesn’t look perfect. width: 100px; Using width: 100% I added the following line to your javascript function, setting the width of div to the width of the textArea element prior to resizing the height of the textArea: divHidden.style.width = element.getBoundingClientRect().width + ‘px’; Some developers also use cols and rows css property to provide textarea size. That allows users to edit multiple lines of plain text of visible character widths the... Property to provide textarea size from being html