Kam
Kam

Reputation: 6008

texarea behavior is different in IE and Firefox

I have the following code:

test.html:

 <textarea class ="errortext" rows="1" cols="30" value=""> </textarea>

test.css:

textarea.errortext {
    white-space: nowrap;
    overflow-y:  hidden;
    overflow-x:  hidden;
    overflow:    -moz-scrollbars-horizontal;
    width:auto; height:auto;
    position:absolute;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
   }

In IE it works as expected I see a box to 1 row and 30 colomns and the box is non-resizable. In Firefox this is not true and the box is resisable.

How can I fix this?

Upvotes: 1

Views: 144

Answers (2)

ozk
ozk

Reputation: 2022

If I understand correctly, to prevent a textarea from being resizable in FF, add the following to your selector:

textarea.errortext {
    resize:none;
}

Upvotes: 2

SLaks
SLaks

Reputation: 887285

You need to add resize: none.

Upvotes: 0

Related Questions