GeraldIstar
GeraldIstar

Reputation: 378

Textarea width/height work like minimal size

I have a textarea that can be resized by user. So I want this textarea to have a setted in css width&height as initial and maximum size. But width&height work like minimum size.

For example: http://jsfiddle.net/8t2E8/

width: 600px;
height: 200px;

Initial size is 600*200. I can make textarea only bigger, but need only smaller. Thanks for help.

Upvotes: 0

Views: 197

Answers (3)

Vivek Parekh
Vivek Parekh

Reputation: 1085

Try this example

textarea{
    width: 300px;
    height: 50px;
    max-width: 600px;
    max-height:200px;
    min-width: 300px;
    min-height: 50px;
}

Although, you should check this post :(

Upvotes: 2

Aray Karjauv
Aray Karjauv

Reputation: 2945

textarea{
max-width: 600px;
max-height: 200px;
}

Upvotes: 0

ôkio
ôkio

Reputation: 1790

textarea{
    width: 600px;
    height: 200px;
    min-width: 300px;
    min-height: 100px;
}

Upvotes: 0

Related Questions