Matt
Matt

Reputation: 1923

How to resize input field

I'm trying to make my input field resizable, but the code I found doesn't work anymore.

#mededeling 
{
resize: both;
}

Does anybody know the most recent working code?

Upvotes: 1

Views: 11901

Answers (2)

<style>
    input {
        resize: horizontal;
        width: 200px;
    }

    input:active {
        width: auto;   
    }

    input:focus {
        min-width: 200px;
    }
</style>  

Upvotes: 0

Vicky
Vicky

Reputation: 174

what about using textarea instead of input? 1row height textarea looks just like input type[text] and can be submitted in form:

textarea name="" id="" cols="30" rows="1"

Upvotes: 1

Related Questions