Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
July 27, 2021 04:01 pm GMT

Simple improving UX of textarea using CSS

Whenever I see textarea with a fixed height I want to scream: "Give me userfriendly textarea". I want to enter data comfortably. Give me this.

I understand developers do that because textarea changing breaks the layout. But we can find a more elegant solution. Set a minimal comfortable height and save resizing of it but disable width changes using resize: vertical. And your users will not break the layout by chance.

don't do this

textarea {  height: 10rem;  resize: none;}

you can use this instead

textarea {  min-height: 10rem;  resize: vertical;}

P.S.
You can say thank you by sharing it on Twitter
I'm always open to any opportunities to share knowledge about CSS and HTML with you. Feel free to reach out to me: [email protected]

Get awesome goods for frontenders: T-Shirt, Stickers, Masks, Magnets

P.S.S. This post was written with the support of my sponsors: Ashlea Gable, Ben Rinehart, Sergio Kagiema, Jesse Willard, Tanya Ten.


Original Link: https://dev.to/melnik909/simple-improving-ux-of-textarea-using-css-2gh7

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To