I have a form in popup modal. When I resize the textarea then close the popup modal and after that when I reopen the popup model its textArea is not in proper form. I want to reset the size of textarea. Please help me out On the same issue.
Asked
Active
Viewed 762 times
2
-
You can give textarea resize:none, it will prevent resizing the textarea. – SRK Mar 19 '18 at 11:55
-
can you post your css? – Vel Mar 19 '18 at 11:55
-
textarea resize is also needed – Paddy Mar 19 '18 at 11:56
-
You mean like [**this**](https://stackoverflow.com/a/36087841/1823841) – palaѕн Mar 19 '18 at 11:56
-
Check if have a cols inline... set textarea{ width: 100% !important} – Luís P. A. Mar 19 '18 at 11:57
-
make the width of that textbox as 100% using css. – sainanky Mar 19 '18 at 11:58
-
Hi vel, textarea{ font-family: inherit; font-size: inherit; line-height: inherit; margin: 0px; overflow: auto; color: inherit; } – Paddy Mar 19 '18 at 12:03
-
1To get rid of the cols inline, use this jQuery (example) : $( "textarea" ).removeAttr( "cols" ); – Luís P. A. Mar 19 '18 at 12:04
-
@palaѕн mentioned another stack for this...which will work? – yjs Mar 19 '18 at 12:05
-
yes. @LuisP.A. suggestion is works. – Vel Mar 19 '18 at 12:06
-
it should be reset the size when close the popup modal... – Paddy Mar 19 '18 at 12:10
-
why dont you set width of `model-some value` to textarea – jasinth premkumar Mar 19 '18 at 12:17
-
You might want to restrict the size of the textarea as in this ticket answer: https://stackoverflow.com/questions/9382245/how-to-disable-textarea-resizing – Dinca Adrian Mar 19 '18 at 12:32
-
there is nothing any re-sizable issue... its size *reset* issue after close popup modal. – Paddy Mar 19 '18 at 12:46
1 Answers
0
You can define in which direction the textarea can be resized by the CSS resize Property
<textarea style="resize:both">Can be resized in every direction</textarea><br>
<textarea style="resize:vertical">Can be resized in vertical direction</textarea><br>
<textarea style="resize:horizontal">Can be resized in horizontal direction</textarea><br>
<textarea style="resize:none">Can not be resized</textarea>

Sebastian Speitel
- 7,166
- 2
- 19
- 38