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: , , , ,

Bookmarks:
  • Digg
  • Technorati
  • del.icio.us
  • Ma.gnolia
  • Reddit
  • Netscape
  • StumbleUpon
  • NewsVine

2 Responses to “How to turn off Safari’s textarea expand”

  1. Jamel Shedd Says:

    magnificent issues altogether, you simply gained a new reader. What might you recommend in regards to your publish that you just made some days ago? Any certain?

  2. Inverdoorn Game Reserve is a 10000 hectare property located in the Ceres-Karoo. This area is in the Western Cape Province of South Africa and is only a 2.5 hour drive from Cape Town. The common idea is that the Karoo is a dry and dead landscape with nothi Says:

    Inverdoorn Game Reserve is a 10000 hectare property located in the Ceres-Karoo. This area is in the Western Cape Province of South Africa and is only a 2.5 hour drive from Cape Town. The common idea is that the Karoo is a dry and dead landscape with …

    […]How to turn off Safari’s textarea expand | James Oppenheim’s blog[…]…

Leave a Reply