osejb.blogg.se

Autosize js
Autosize js




autosize js

If it was a or any other element that is block-level, it would also expand vertically as needed.

autosize js

That will naturally grow to be the width it needs to be for the content it contains. We can make any element editable and input-like with the contenteditable attribute: It’s weird to me that there is no way to force an input element to mimic this behavior, but alas. I was thinking about this after Remy Sharp blogged about it recently in the context of inline elements. But of course, there are ways, my friend. Kinda funny, as that seems like a reasonable use-case. In fact, there isn’t any simple HTML or CSS way to make them do that. By default, and elements don’t change size based on the content they contain.






Autosize js