An Interest In:
Web News this Week
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
- March 25, 2024
- March 24, 2024
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
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To