textarea disable resize
We’ve all been there. You’re on a computer and you want to create a form, but you can’t because the textarea is too small. You try to resize it, but it just won’t go any smaller. You try and make your form small, but you can’t because the textarea itself is too wide. You try and make your textarea smaller, but there just isn’t enough room.
If you have a textarea you are trying to resize on the web and you dont have enough room because of its size, what do you do? You use the “resize” attribute on it. It tells browsers to resize it using CSS. Most people don’t think much of this, but there is no denying that a textarea has a limited width and height.
There is just really no way to make textareas smaller. Just the other day I was about to create a textarea that was as small as possible. Then I realized I could fix it by using the textarea’s CSS property text-rendering which is basically telling the browser to use CSS to actually draw your text. In the CSS, you can choose the way your text is displayed, size, color, etc.
The first thing I did was to add the textarea CSS property text-rendering. So there’s two options: text-rendering 1 and text-rendering 2. Text-rendering 1 is the default rendering engine. When you actually render your textarea, it will default to render the textarea itself, and text-rendering 2 is a bit more complicated. You will have to figure out how to change your text-rendering style.
Well, I chose the option that says text-rendering 2. This makes your textarea display a completely different look from that of normal text. It will still have the same width and height, but the textarea itself will be a different color and it will still look a bit different.
Now, before you click away from that link and go and try a CSS reset, let me just go ahead and explain the difference.
The text-rendering 2 option is a bit more complicated. You’ll have to figure out how to change your text-rendering style. Well, I chose the option that says text-rendering 2. This makes your textarea display a completely different look from that of normal text. It will still have the same width and height, but the textarea itself will be a different color and it will still look a bit different.
The downside of the text-rendering2 option is that your text will be much smaller and you will have to work much harder to make it go full-screen. I’m not sure what the technical term for this is, but it’s probably a small bug that only happens in IE.
The reason it looks so jarring to me is because it’s not just a terrible design choice. The problem is that when you resize to a new size, it looks slightly larger.
I know the textarea is a great solution for people who want to have a textarea that stays the same size. But when you resize your textarea, you may actually make your textarea a lot bigger. In this case, you may be leaving an area of your textarea that you don’t want to be. This is where the textarea disable resize option may help. Instead of resizing your textarea, just disable resizing.