How to make textareas grow automatically with a little bit of CSS and one line of JavaScript (#note)

This post is a quick one for the bookmarks: Chris Coyier shared a smart way to automatically grow textareas when user content expands across the defined textarea size.

See the Pen Easiest Autogrowing Textarea by Chris Coyier
(…

This post is a quick one for the bookmarks: Chris Coyier shared a smart way to automatically grow textareas when user content expands across the defined textarea size.

The solution uses stacked CSS grid elements, pseudo-elements, and one (!) line of inline JavaScript. Beautiful!


Reply to Stefan
Print Share Comment Cite Upload Translate
CITATION GOES HERE CITATION GOES HERE
Select a language: