Reputation: 1804
There is this form I have and I would like the description field to be a textarea with the text box having the blue div as its background. I can adjust the rows and columns but problem is in google chrome it works but firefox it adds 2 extra rows which prevents me from fitting the textarea in the div properly...Any idea on what I can do about this?
Upvotes: 0
Views: 481
Reputation: 99929
You can style textareas with css width and height:
.the-blue-background {
width: 300px;
height: 300px;
}
.the-blue-background textarea {
height: 100%;
width: 100%;
}
Try it here: http://jsfiddle.net/MwnSn/14/
Upvotes: 1
Reputation: 103428
Rather than specifying cols
and rows
, use CSS to specify height
and width
You are a lot more likely to get a cross-browser result with this method.
Upvotes: 3