How to turn off Safari’s textarea expand
Apple’s Safari web browser has for a while had the ability for users to drag the bottom right corner of a textarea and resize it to make room for more content.
While resizing textareas creates a nice unobtrusive enhancement, unfortunately it can sometimes break your CSS layout as well. So how can you turn it off? Well you actually have two easy options:
Option 1: Add min and max widths to your textarea so that Safari users can only resize it as far as you will let them.
textarea {
max-width: 300px;
max-height: 300px;
}
Option 2: If you do not want to let a Safari user resize the textarea at all, you can use the resize CSS property.
textarea{
resize: none;
}
Nice and easy - see my example of How to turn off Safari’s textarea expand.
Technorati Tags: CSS, Web Standards, Safari, Web browsers, Textarea resize







