In this post, we will see how to resolve How do i resize a textarea, to content width, having min-width and max-width?
Question:
So, i have troubles with a textarea now, and i cant make it resize to a content width… Ive found a long and detailed answer about content height, and it works !! but not having the content width on it…This is that post: Creating a textarea with auto-resize
BUT, my issue isnt solved, i need the width to resize too. Considering max and min widths.
This is the example code:
Also, this is how i want them to be:

Best Answer:
Something like this?Note: as said in the comment, this technique uses the
contenteditable
property insteadIf you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com