I want to use (div) as a (textarea) element in html. Because when I used (textarea), it’s width and height was not fixed. I want that when some one open my website they can write something on (div) like what peoples do in Facebook wall. In simple words I want to make wall like Facebook.
Share
Using HTML5, you can use the
contenteditableattribute, e.g.HTML
This would work how it is, but it should probably have a style, to look and behave nicer. For example:
CSS
This is what Facebook actually does.
min-heightis how big it will start off. Then it will extend up to 100px high, then it will start using a scroll bar, because ofoverflow-y: auto;.